RE: How to get webapp name

2001-12-17 Thread Neil Aggarwal

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 DevelopmentWebsites, 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]




Re: How to get webapp name

2001-12-17 Thread Yoav Shapira

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 DevelopmentWebsites, 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]




How to get webapp name

2001-12-16 Thread Neil Aggarwal

Hello:

Is there a way to get the webapp name in a JSP page?

Thanks,
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases

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




Re: How to get webapp name

2001-12-16 Thread Mahesh Vaidya

Hi,
I think you are looking for information about current servlet, isn't it ?
you can use 

ServletContext sc = getServletContext();
   out.println(Context is  + sc.getRealPath(/));
Thanks


Neil Aggarwal wrote:

Hello:

Is there a way to get the webapp name in a JSP page?

Thanks,
   Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases

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




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: How to get webapp name

2001-12-16 Thread Micael Padraig Og mac Grene

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]