tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Goodman" <tom_good...@bigfoot.com>
Subject Trouble using <jsp-file> in web.xml to make JSP controller.
Date Wed, 17 May 2000 19:18:18 GMT
I am trying to direct all URL requests to be handled by one JSP "controller"
file (test2.jsp) using the <jsp-file> directive in web.xml so that all jsp
files in /control/* are handled by test2.jsp, but I get an "Internal Servlet
Error" (see below) when I try it.  How do I force all .jsp requests to be
handled by a single .jsp file (which will then redirect as necessary?  It
seems this should work.  Does anyone have this working?

In the example below, test2.jsp is a simple html document with no
server-side code so that shouldn't be the problem

I'm using  JDK 1_2_2-linux-i386 and tomcat 3.1

Thanks for any help!

tom
-----

web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
  <servlet>
    <servlet-name>webTierEntryPoint</servlet-name>
    <display-name>centralJsp</display-name>
 <jsp-file>
    test2.jsp
 </jsp-file
 </servlet>
 <servlet-mapping>
    <servlet-name>webTierEntryPoint</servlet-name>
    <url-pattern>/control/*</url-pattern>
 </servlet-mapping>
</web-app>



Error: 500
Location: /hatcher/control/test.jsp
Internal Servlet Error:

java.lang.NullPointerException:
 at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:353)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:147)
 at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334
)
 at java.lang.Thread.run(Thread.java:475)




Mime
View raw message