|
@@ -134,21 +134,21 @@ public class JFinalFilter implements Filter {
|
|
|
log = Log.getLog(JFinalFilter.class);
|
|
log = Log.getLog(JFinalFilter.class);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- boolean isJsp(String target) {
|
|
|
|
|
- int lastIndexOf = target.lastIndexOf(".");
|
|
|
|
|
- if (lastIndexOf > -1) {
|
|
|
|
|
- String t = target.substring(lastIndexOf + 1);
|
|
|
|
|
- int len = t.length();
|
|
|
|
|
- int i = 0;
|
|
|
|
|
- char c;
|
|
|
|
|
- if (i < len && ((c = t.charAt(i++)) == 'j' || c == 'J')) {
|
|
|
|
|
- if (i < len && ((c = t.charAt(i++)) == 's' || c == 'S')) {
|
|
|
|
|
- if (i < len && ((c = t.charAt(i)) == 'p' || c == 'P')) {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ boolean isJsp(String target) {
|
|
|
|
|
+ int lastIndexOf = target.lastIndexOf('.');
|
|
|
|
|
+ if (lastIndexOf > -1) {
|
|
|
|
|
+ String t = target.substring(lastIndexOf + 1);
|
|
|
|
|
+ int len = t.length();
|
|
|
|
|
+ int i = 0;
|
|
|
|
|
+ char c;
|
|
|
|
|
+ if (i < len && ((c = t.charAt(i++)) == 'j' || c == 'J')) {
|
|
|
|
|
+ if (i < len && ((c = t.charAt(i++)) == 's' || c == 'S')) {
|
|
|
|
|
+ if (i < len && ((c = t.charAt(i)) == 'p' || c == 'P')) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|