You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by BugRat Mail System <to...@cortexity.com> on 2000/09/25 23:29:26 UTC

BugRat Report #164 has been filed.

Bug report #164 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com:8888/BugRatViewer/ShowReport/164>

REPORT #164 Details.

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: serious
Confidence: public
Environment: 
   Release: Tomcat 3.1
   JVM Release: Java 2
   Operating System: Sun/Solaris
   OS Release: recent
   Platform: Sun/Solaris

Synopsis: 
JSP file names have 'null' appended to them when defined in web.xml

Description:
I tried to create a web.xml file to run the snoop.jsp file that comes with Tomcat (see TOMCAT_HOME/examples/jsp/snp).

I created a new webapps directory, called myJspTest, and defined it in the server.xml file.

I placed the snoop.jsp file in it, and a WEB-INF/web.xml file.  The web.xml file contains this:

<!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>
            snoop
        </servlet-name>
        <jsp-file>
            /snoop.jsp
        </jsp-file>
        <init-param>
            <param-name>foo</param-name>
            <param-value>bar</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>
            snoop
        </servlet-name>
        <url-pattern>
            /snoop
        </url-pattern>
    </servlet-mapping>

    <session-config>
      <session-timeout>30</session-timeout>    <!-- 30 minutes -->
    </session-config>

</web-app>

However, when I invoked .../myJsp/Test/snoop, I received this error:

Error: 404

Location: /myJspTest/snoop.jspnull

File Not Found
/myJspTest/snoop.jspnull 

How does one create the web.xml file to invoke snoop.jsp without the server adding the 'null' to it?