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/05 22:36:27 UTC
BugRat Report #72 has been filed.
Bug report #72 has just been filed.
You can view the report at the following URL:
<http://znutar.cortexity.com:8888/BugRatViewer/ShowReport/72>
REPORT #72 Details.
Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: serious
Confidence: public
Environment:
Release: Tomcat 3.2
JVM Release: JDK 1.2.2
Operating System: Linux
OS Release: Redhat 6.2
Platform: Intel
Synopsis:
request.getServletPath() returning context directory, not path to servlet.
Description:
I have a servlet that is producing a HTML document with a FORM to submit data back into itself. The FORM tag's action attribute is set via a call to getServletPath() HttpRequest instance 'request' On other servlet engines this returns the full path to the servlet it is running from: eg, when running under JSWDK 1.0.1, with the servlet running as http://localhost:8080/servlets/MyServlet getServletPath() returns the string "/servlets/MyServlet" which works fine. Under Tomcat, though, when the servlet is run from http://myserver:8080/myservlet/myservlet (As I have it mapped in the web.xml and servet.xml <Context>) getServletPath() returns "/myservlet" instead of "/myservlet/myservlet"