<% String filePath = "/test/test.jsp"; String fileExt = filePath.substring(filePath.lastIndexOf('.') + 1).toLowerCase(); %>