I have a Servlet (with JSP's) which was created using NetBeans, and I did use the 
appropriate hierarchy.
When I run the servlet using the NetBeans Internal Tomcat version 4.0.4 
the Servlet and JSP pages work fine.  However, when I create a WAR file and let Tomcat 
do the Auto Deploy and 
try to run under Tomcat 4.1.18 the servlet fails.  The first  page is just   a JSP  
and it is displayed okay  but it then posts to my Servlet and it immediately returns 
to the initial page.  My error page is not displayed.  I can't find anything in the 
log files.
It appears the problem might be related to the url-pattern.
In my web.xml file I have the following:
  <servlet-mapping>
    <servlet-name>SAWSServlet</servlet-name>
    <url-pattern>/SAWSServlet</url-pattern>
  </servlet-mapping>

Running Tomcat 4.0.4 from within netbeans the URL which it successfully posts to after 
the logon 
screen looks as follows:  
http://localhost:8081/SAWSServlet?action=logon&UserId=test&Password=test

Under Tomcat 4.1.18 the URL which it tries to post to after logon has an extra "/" 
after the servlet name and 
before the query string parameters:  
http://localhost:8080/SAWSServlet/?action=logon&UserId=test&Password=test

Can anyone explain why I'm getting the extra "/" after the sevlet name?    I'm 
wondering if there is a setting in the server.xml or web.xml for the whole Tomcat 
install that is different in 4.1.18 than the Netbeans Internal version of Tomcat 
4.0.4.   
TIA for any help!
Randy


Reply via email to