tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Barker" <wbar...@wilshire.com>
Subject [PATCH] JspInterceptor can't find jsp file in TC3.3M2
Date Tue, 03 Apr 2001 19:50:02 GMT
   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());



Mime
View raw message