You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@locus.apache.org on 2000/12/27 08:18:17 UTC
cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/modules/facade22 LoadOnStartupInterceptor.java
costin 00/12/26 23:18:17
Modified: src/facade22/org/apache/tomcat/modules/facade22
LoadOnStartupInterceptor.java
Log:
Tested and fixed LoadOnStartup for jsps ( including workaround for the
common bug of not adding the leading /).
LoadOnStartup needs a bit of simplification, but modules can be fixed later.
Revision Changes Path
1.4 +9 -2 jakarta-tomcat/src/facade22/org/apache/tomcat/modules/facade22/LoadOnStartupInterceptor.java
Index: LoadOnStartupInterceptor.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/modules/facade22/LoadOnStartupInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LoadOnStartupInterceptor.java 2000/12/14 07:10:57 1.3
+++ LoadOnStartupInterceptor.java 2000/12/27 07:18:16 1.4
@@ -164,13 +164,20 @@
cm.initRequest(request,response);
String requestURI = path + "?jsp_precompile=true";
-
+
+ if( !path.startsWith( "/" ) ) path="/" + path;
request.requestURI().setString(context.getPath() + path);
+
+ // this is not used with JspInterceptor, but maybe a jsp servlet is
+ // used
request.queryString().setString( "jsp_precompile=true" );
request.setContext(context);
- cm.service( request, response );
+ //cm.service( request, response );
+ // If we switch to JspInterceptor, it's enough to process the
+ // request, it'll detect the page and precompile
+ cm.processRequest( request );
}
// --------------------
// Old logic from Context - probably something cleaner can replace it.