tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lu, Spencer" <>
Subject getContextPath, getServletPath, getPathInfo return values
Date Mon, 30 Apr 2001 23:06:59 GMT

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

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

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


View raw message