[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    getContextPath, getServletPath, getPathInfo return values
From:       "Lu, Spencer" <slu () spaceworks ! com>
Date:       2001-04-30 23:06:59
[Download RAW message or body]

Hi,

I'm running Tomcat 3.2.1 on Windows NT.  In my server.xml I have defined a
Context for my web app and the path is set to "/".  In my web.xml my servlet
maps to "/*".  In my servlet I make calls to getContextPath(),
getServletPath(), and getPathInfo().  When I access
http://localhost:8080/Login.htm, here are the values that are returned by
the calls:

getContextPath(): empty string
getServletPath(): empty string
getPathInfo(): /Login.htm

But when I run my web app under BEA Weblogic Server, I get the following
values:

getContextPath(): empty string
getServletPath(): /Login.htm
getPathInfo(): null

I'm just wondering why Tomcat and Weblogic return different values, and
which one is correct.

Thanks,
Spencer 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic