Hi,
Depends on what exactly you need. You could use .getRealPath("/") to get a
String like "/tomcat/webapps/my-web-app/", then you can parse it to isolate
the "my-web-app" part.
Personally, I use a Filter (but load-on-webapp-init Servlet will do) that
takes a parameter like "webapp=webapp.com" and stores it in application
(ServletContext) scope so it's available to any Servlet/JSP.Greetings, deacon Marcus > -----Original Message----- > From: chiuming [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 02, 2001 3:19 AM > To: [EMAIL PROTECTED] > Subject: get Servlet Context Name > > > hi, > any way I can get a servlet context ( web application > )'s name with in a servlet? on Servlet API 2.2 (not > Servlet 2.3) > > -OR- there is no way to do that? > > P.S. I am using tomcat... may I access internal tomcat > object to achieve that? > > thanks > > __________________________________________________ > Do You Yahoo!? > Listen to your Yahoo! Mail messages from any phone. > http://phone.yahoo.com
