I tried changing the URL Pattern as suggested below but that didn't fix the problem. With regards to my code, I have a simple form in my JSP which uses the "GET" method to send some form field values to my servlet. I'll paste the code below.
<FORM action="/SAWSServlet" class="formClass" method="get" > <INPUT type="HIDDEN" id="action" name= "action" value="logon"> <p>UserId: <INPUT type="TEXT" id="UserId" name= "UserId" width="50"></p> <p>Password: <INPUT type="PASSWORD" id="Password" name= "Password" width="50"></p> <p><INPUT type="SUBMIT" id="Submit" value="Logon" width="50"></p> </FORM> When I run this under Tomcat 4.1.18 there is an extra "/" inserted between the action and the start of the query string. I don't have this problem when running the exact same code in NetBeans using the Internal Tomcat version 4.0.4. The incorrect URL which is generated under Tomcat 4.1.18 is: http://localhost:8080/SAWSServlet/action=logon&userId=test&password=test Since the exact same code works in one version but fails in another that makes me suspect that the problem is a configuration issue. Any clue what could be making the URL different between the two versions of Tomcat? Thanks, Randy Quoting "Craig R. McClanahan" <[EMAIL PROTECTED]>: ... > > 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! > > Without seeing the code in your JSP page that generates the URL you > are > posting to, there is no way to know what's really going on. However, > a > workaround that will make Tomcat forward the "extra slash" URL to > your > servlet anyway would be to change the URL pattern to > "/SAWSServlet/*" > instead. > > > Randy > > > > Craig > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]