You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by William Barker <wb...@wilshire.com> on 2001/04/03 21:50:02 UTC
[PATCH] JspInterceptor can't find jsp file in TC3.3M2
If you use a <servlet-mapping> in your web.xml file, JspInterceptor
attempts to compile the mapped name rather than the actual jsp file. I've
patched my copy of tomcat by:
*** JspInterceptor.java.orig Tue Apr 3 12:56:11 2001
--- JspInterceptor.java Tue Apr 3 12:59:58 2001
***************
*** 585,590 ****
--- 585,591 ----
try {
Options options=new JasperOptionsImpl(args);
JspCompilationContext ctxt=createCompilationContext(req,
+
jspFile,
options,
mangler);
JavaCompiler javaC=createJavaCompiler( options );
***************
*** 747,758 ****
}
private JspCompilationContext createCompilationContext( Request req,
Options opt,
Mangler mangler)
{
JasperEngineContext ctxt = new JasperEngineContext();
ctxt.setServletClassName( mangler.getClassName());
! ctxt.setJspFile( req.servletPath().toString());
ctxt.setClassPath( computeClassPath( req.getContext()) );
// System.out.println("computeClasspath:"+ctxt.getClassPath());
ctxt.setServletContext( req.getContext().getFacade());
--- 748,760 ----
}
private JspCompilationContext createCompilationContext( Request req,
+ String
jspFile,
Options opt,
Mangler mangler)
{
JasperEngineContext ctxt = new JasperEngineContext();
ctxt.setServletClassName( mangler.getClassName());
! ctxt.setJspFile(jspFile);
ctxt.setClassPath( computeClassPath( req.getContext()) );
// System.out.println("computeClasspath:"+ctxt.getClassPath());
ctxt.setServletContext( req.getContext().getFacade());