public static void rewriteURL ( ServletContext servletContext , ServletRequest request , ServletResponse response , MutableURI url , URLType type , boolean needsToBeSecure ) { ArrayList /*< URLRewriter >*/ rewriters = getRewriters ( request ) ; if ( rewriters != null ) { for ( Iterator i = rewriters . iterator ( ) ; i . hasNext ( ) ; ) { URLRewriter rewriter = ( URLRewriter ) i . next ( ) ; rewriter . rewriteURL ( servletContext , request , response , url , type , needsToBeSecure ) ; } } if ( url instanceof FreezableMutableURI ) { ( ( FreezableMutableURI ) url ) . setFrozen ( true ) ; } }
Rewrite the given URL looping through the list of registered URLRewriters .