tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <>
Subject Re: repost: contextPath + servletPath + pathInfo = requestURI?
Date Fri, 12 Nov 1999 17:08:56 GMT
Hi Geoff,

> [...]
> >My interpretation of the spec is that it should result in this (for the
> default
> >context):
> >
> >  contextPath = ""
> >  servletPath = "/blah"
> >  pathInfo = null
> Ah, I get it. This spec is not clear on this point, and IMVVHO it seems, er,
> non-optimal. I would have thought having a null or empty servletPath makes a
> lot more sense than a null or empty pathInfo in this situation. Certainly
> for my particular applications I'll have to add extra code to support this
> particular case, but as always I suppose there is a bigger picture that only
> those who've written a servlet container can know... :-)

The basic rule is that servletPath contains the part of the path that
was used to select the servlet and pathInfo contains the rest. When the
servlet is selected by the default path ("/") rule, the whole path is used
to select the servlet so servletPath contains the whole path and pathInfo

> Anyway, thanks for the help Hans! Most appreciated...

You're welcome.

Hans Bergsten
Gefion Software

View raw message