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/08/21 09:03:27 UTC

BugRat Report #29 has been filed.

Bug report #29 has just been filed.

You can view the report at the following URL:

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

REPORT #29 Details.

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: critical
Confidence: public
Environment: 
   Release: 3.3dev (few weeks old)
   JVM Release: 1.3
   Operating System: NT
   OS Release: 4
   Platform: x76

Synopsis: 
requestURI != contextPath + servletPath + pathInfo for default servlets

Description:
If you create a web application "webapp", with a default servlet, and enter
the URL http://www.mysite.com/webapp , Tomcat returns the following:

getContextPath() = "/webapp"
getServletPath() = "/"

this violates the spec which specifies

requestURI = contextPath + servletPath + pathInfo

in this case, it appears that getServletPath() ought to return ""

I found another case too... seems it can be best summarised like so:

- "/context"  => context="/context" servletpath="/" pathinfo=null
  should be   => context="/context" servletpath=""  pathinfo=null

- "/context/" => context="/context" servletpath="/" pathinfo="/"
  should be   => context="/context" servletpath="/" pathinfo=null