tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Moore" <tmo...@blackboard.com>
Subject RE: How can I get the web application name?
Date Tue, 11 Feb 2003 12:46:10 GMT
Or ServletContext.getServletContextName() if you mean the value of the
display-name element from web.xml.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -----Original Message-----
> From: Tim Funk [mailto:funkman@joedog.org] 
> Sent: Tuesday, February 11, 2003 7:44 AM
> To: Tomcat Users List
> Subject: Re: How can I get the web application name?
> 
> 
> Do you mean HttpServletRequest.getContextPath()?
> 
> -Tim
> 
> Etienne wrote:
> > Hi, I found a way to retrieve the web application name for 
> WebSphere I 
> > guess. Can I do the same for Tomcat?
> > 
> > Thanks.
> > 
> > Etienne.
> > 
> > 
> > 
> > 
> >>George,
> >>I've got a small servlet that'll show the docroot.  Check out 
> >>http://home.nc.rr.com/hygh/was/WebAppName.java
> >>
> >>Ken
> >>
> >>George wrote:
> >>
> >>
> >>>Hi,
> >>>In a servlet, I want to get the Web Application Name in which the
> > 
> > servlet
> > 
> >>>belongs.
> >>>Actually, I want to retrieve the webapp docRoot using
> >>>
> >>>I found in ServletEngineConfigDumper example the following 
> code, but
> > 
> > I need
> > 
> >>>the webappname
> >>>
> >>>     ServletEngineInfo engineInfo =
> > 
> > ServletEngine.getEngine().getInfo();
> > 
> >>>     ServletHostInfo vhinfo       =
> >>>engineInfo.getServletHostInfo("default_host");
> >>>     WebGroupInfo wgInfo          =
> > 
> > vhinfo.getWebGroupInfo("webappname");
> > 
> >>>    String docroot=wgInfo.getDocumentRoot();
> >>>
> >>>Any other way to get the WebApplication Doc Root?
> >>>
> >>>Thank you
> >>>George
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message