You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hans Gerwitz <ja...@phobia.com> on 2000/07/07 15:43:20 UTC
Jasper log() in root-mounted context
Short story: Jasper is throwing
java.lang.NullPointerException:
at javax.servlet.GenericServlet.getServletName(GenericServlet.java:368)
at javax.servlet.GenericServlet.log(GenericServlet.java:300)
whenever I invoke log() within a jsp. I had thought it was context-related,
but reproduced it in the examples context while writing the message below.
Is and implicit log() call no longer supported within JSP, or is my
configuration missing something? Thanks.
----
I have a context mounted at "/", using Tomcat 3.1 release behind
Apache/mod_jserv. (I love being able to host JServ and Tomcat behind the
same Apache process, thanks to ajpv12!)
the relevant Tomcat server.xml includes:
<Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" >
</Context>
and tomcat.conf (included in httpd.conf) defines a virtual host that
includes:
<IfModule mod_jserv.c>
AddType test/jsp .jsp
AddHandler jserv-servlet .jsp
ApJServMount /examples ajpv12://localhost:8009/examples
ApJServMount / ajpv12://localhost:8009/ROOT
ApJServMount /admin ajpv12://localhost:8009/admin
</IfModule>
and of course the Connector is servicing 8009, yaddayaddayadda.
Everything is fine with the servlets and JSPs that I've installed in this
context except calls to Servlet.log(), which generate:
java.lang.NullPointerException:
at javax.servlet.GenericServlet.getServletName(GenericServlet.java:368)
at javax.servlet.GenericServlet.log(GenericServlet.java:300)
I tried copying the default web.xml into WEB-INF to explicitly give this
context a <servlet-name>, to no avail.
----
Re: Jasper log() in root-mounted context
Posted by Alex Chaffee <gu...@edamame.stinky.com>.
That should be fixed in the latest source tree. Please download and
confirm.
Cheers -
- Alex
On Fri, Jul 07, 2000 at 08:43:20AM -0500, Hans Gerwitz wrote:
> Short story: Jasper is throwing
>
> java.lang.NullPointerException:
> at javax.servlet.GenericServlet.getServletName(GenericServlet.java:368)
> at javax.servlet.GenericServlet.log(GenericServlet.java:300)
>
> whenever I invoke log() within a jsp. I had thought it was context-related,
> but reproduced it in the examples context while writing the message below.
>
> Is and implicit log() call no longer supported within JSP, or is my
> configuration missing something? Thanks.
>
--
Alex Chaffee mailto:alex@jguru.com
jGuru - Java News and FAQs http://www.jguru.com/alex/
Creator of Gamelan http://www.gamelan.com/
Founder of Purple Technology http://www.purpletech.com/
Curator of Stinky Art Collective http://www.stinky.com/