static int getPatternType ( String urlPattern ) { int type = EXACT ; if ( urlPattern . startsWith ( "*." ) ) type = EXTENSION ; else if ( urlPattern . startsWith ( "/" ) && urlPattern . endsWith ( "/*" ) ) type = PREFIX ; else if ( urlPattern . equals ( "/" ) ) type = DEFAULT ; return type ; }
Determine the url - pattern type