1 Reply Latest reply on Mar 3, 2002 1:00 PM by Werner Ramaekers

    Servlet mappings not working in JBoss-Tomcat

    Ben Newbie

      I am using the JBoss 2.4.3 and Tomcat 3.2.3 bundled distribution. I am developing a web application and testing it by using a modified version of "build.bat", which comes with the Tomcat part of this distribution.

      In the root of my web application I have a file called "template.jsp". I want to be able to map calls to any html files in the root of my web application to this JSP file.

      In order to do this, the web.xml file for the web application contains the following lines:


      <servlet-name>template</servlet-name>
      <jsp-file>/template.jsp</jsp-file>


      <servlet-mapping>
      <servlet-name>template</servlet-name>
      <url-pattern>/*.html</url-pattern>
      </servlet-mapping>

      When I build this web application and access it with a request like the following:

      http://localhost:8080/AJUG/template.html

      I get:

      Not found (404)
      Original Request: /AJUG/template.html
      Not found request: /AJUG/template.html

      It's true that template.html does not exist, but I was hoping that the request would get mapped to template.jsp, which does exist.

      Does anyone know why this is happening?

      Regards,

      Ben