Hi,
Maybe what you're looking for is the webapp's context, and for
that you can try HttpServletRequest.getContextPath():
public java.lang.String getContextPath()
Returns the portion of the request URI that indicates the context of the
request. The context path always comes first in a request URI. The path
starts with a "/" character but does not end with a "/" character. For
servlets in the default (root) context, this method returns "".
Returns:
a String specifying the portion of the request URI that indicates the
context of the request

Yoav

Neil Aggarwal wrote:
> 
> Micael:
> 
> I am looking for the name of the web application.
> 
> For example, if I look at http://dev.leads-unlimited.com/leads/index.jsp
> 
> The webapp name is leads.
> 
> It is the same name as the directory that contains the
> JSP files.
> 
> Thanks,
>         Neil.
> 
> --
> Neil Aggarwal
> JAMM Consulting, Inc.    (972) 612-6056, http://www.JAMMConsulting.com
> Custom Internet Development    Websites, Ecommerce, Java, databases
> 
> > -----Original Message-----
> > From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, December 16, 2001 4:04 PM
> > To: Tomcat Users List
> > Subject: Re: How to get webapp name
> >
> >
> > At 02:29 PM 12/16/01 -0600, you wrote:
> > >Hello:
> > >
> > >Is there a way to get the webapp name in a JSP page?
> > >
> > >Thanks,
> > >         Neil.
> >
> >
> > Hi, Neil,
> >
> > Cannot tell what ou want here.  Try stating it differently.  What do you
> > mean by "webapp"?
> >
> > -- micael
> >
> >
> > --
> > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to