Buggy code:
public class InvokerServlet extends HttpServlet { private Context context ; public void init ( ) throws ServletException { } public void service ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String requestPath = request . getRequestURI ( ) ; String pathInfo = ( ( String ) ( request . getAttribute ( ATTRIBUTE_PathInfo ) ) ) ; if ( pathInfo == null ) { pathInfo = request . getPathInfo ( ) ; } String includedRequestURI = ( ( String ) ( request . getAttribute ( ATTRIBUTE_RequestURI ) ) ) ; boolean inInclude = false ; if ( includedRequestURI != null ) { inInclude = true ; } else { inInclude = false ; } String servletName = "" ; String newServletPath = "" ; String newPathInfo = "" ; if ( ( ( pathInfo != null ) && ( pathInfo . startsWith ( "//" ) ) ) && ( ( pathInfo . length ( ) ) > 2 ) ) { servletName = pathInfo . substring ( 1 , pathInfo . length ( ) ) ; if ( ( servletName . indexOf ( "//" ) ) > ( - 1 ) ) { servletName = servletName . substring ( 0 , servletName . indexOf ( "//" ) ) ; } if ( ! inInclude ) { newServletPath = ( ( request . getServletPath ( ) ) + "//" ) + servletName ; } else { newServletPath = ( ( ( String ) ( request . getAttribute ( ATTRIBUTE_ServletPath ) ) ) + "//" ) + servletName ; } try { if ( inInclude ) { newPathInfo = includedRequestURI . substring ( newServletPath . length ( ) , includedRequestURI . length ( ) ) ; } else { newPathInfo = requestPath . substring ( ( ( context . getPath ( ) . length ( ) ) + ( newServletPath . length ( ) ) ) , requestPath . length ( ) ) ; } int i = newPathInfo . indexOf ( "?" ) ; if ( i > ( - 1 ) ) { newPathInfo = newPathInfo . substring ( 0 , i ) ; } if ( ( newPathInfo . length ( ) ) < 1 ) { newPathInfo = null ; } } catch ( Exception e ) { newPathInfo = null ; } } else { doError ( response , ( ( ( "Not<seq2seq4repair_space>enough<seq2seq4repair_space>information<seq2seq4repair_space>" + ( request . getRequestURI ( ) ) ) + "<seq2seq4repair_space>" ) + pathInfo ) ) ; return ; } ServletWrapper wrapper = context . getServletByName ( servletName ) ; if ( wrapper == null ) { wrapper = new ServletWrapper ( ) ; wrapper . setContext ( context ) ; wrapper . setServletClass ( servletName ) ; wrapper . setServletName ( servletName ) ; try { context . addServlet ( wrapper ) ; } catch ( TomcatException ex ) { ex . printStackTrace ( ) ; } } HttpServletRequestFacade requestfacade = ( ( HttpServletRequestFacade ) ( request ) ) ; HttpServletResponseFacade responsefacade = ( ( HttpServletResponseFacade ) ( response ) ) ; Request realRequest = requestfacade . getRealRequest ( ) ; Response realResponse = realRequest . getResponse ( ) ; String savedServletPath = null ; String savedPathInfo = null ; if ( ! inInclude ) { savedPathInfo = realRequest . getPathInfo ( ) ; savedServletPath = realRequest . getServletPath ( ) ; } else { savedServletPath = ( ( String ) ( realRequest . getAttribute ( ATTRIBUTE_ServletPath ) ) ) ; savedPathInfo = ( ( String ) ( realRequest . getAttribute ( ATTRIBUTE_PathInfo ) ) ) ; } if ( ! inInclude ) { realRequest . setServletPath ( newServletPath ) ; realRequest . setPathInfo ( newPathInfo ) ; } else { if ( newServletPath != null ) { realRequest . setAttribute ( ATTRIBUTE_ServletPath , newServletPath ) ; } if ( newPathInfo != null ) { realRequest . setAttribute ( ATTRIBUTE_PathInfo , newPathInfo ) ; } if ( newPathInfo == null ) { realRequest . removeAttribute ( ATTRIBUTE_PathInfo ) ; } } <START_BUG> wrapper . handleRequest ( requestfacade , responsefacade ) ; <END_BUG> if ( ! inInclude ) { realRequest . setServletPath ( savedServletPath ) ; realRequest . setPathInfo ( savedPathInfo ) ; } else { if ( savedServletPath != null ) { realRequest . setAttribute ( ATTRIBUTE_ServletPath , savedServletPath ) ; } else { realRequest . removeAttribute ( ATTRIBUTE_ServletPath ) ; } if ( savedPathInfo != null ) { realRequest . setAttribute ( ATTRIBUTE_PathInfo , savedPathInfo ) ; } else { realRequest . removeAttribute ( ATTRIBUTE_PathInfo ) ; } } } public void doError ( HttpServletResponse response , String msg ) throws IOException , ServletException { } }

Fix:
wrapper . handleRequest ( realRequest , realResponse ) ;