cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14564] New: - JspEngineImpl causes NullPointerException
Date Thu, 14 Nov 2002 19:56:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14564>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14564

JspEngineImpl causes NullPointerException

           Summary: JspEngineImpl causes NullPointerException
           Product: Cocoon 2
           Version: 2.0.3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: sitemap components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: dillenbu@uic.edu


The JspEngineImpl$config class defines getInitParameter(String name) to return 
null.  This causes a NullPointerException to be thrown in Jasper at 
org.apache.jasper.EmbededServletOptions:294.  This only happens if the user 
has any global init parameters defined in their web.xml servlet 
configuration.  The web.xml that ships with Cocoon2 does not have any such 
parameters, which is why the Jsp samples pages work fine.  Here's a fix:

/usr/local/cocoon$ diff -c 
src/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java 
src/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java~
*** src/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java	Thu 
Nov 14 13:35:21 2002
--- src/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java~	Mon 
Jul 15 03:56:05 2002
***************
*** 141,148 ****
          public Enumeration getInitParameterNames()
                 { return c.getInitParameterNames(); }
          public ServletContext getServletContext() { return c; }
!         public String getInitParameter(String name)
!                { return c.getInitParameter(name); }
      }
  
      /**
--- 141,147 ----
          public Enumeration getInitParameterNames()
                 { return c.getInitParameterNames(); }
          public ServletContext getServletContext() { return c; }
!         public String getInitParameter(String name) { return null; }
      }
  
      /**

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message