tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: How to get the context path for a web application?
Date Tue, 10 Aug 2004 12:54:36 GMT

getServletContextName requires that you define it in your web.xml, and
doesn't need to correspond to the path attribute of the Context element,
so don't count on that.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Dov Rosenberg []
>Sent: Monday, August 09, 2004 10:49 PM
>To: Tomcat Users List
>Subject: How to get the context path for a web application?
>I need to find a way to get the context path of the current web
>I would like to to it using the HttpSession, HttpServletRequest or
>I tried the ServletContext.getServletContextName but it returns null in
>Tomcat. Is there a cross container solution?
>Dov Rosenberg
>Conviveon Corporation
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message