[EMAIL PROTECTED] wrote:
One reason a filter would be better is you can fully
construct the URL dynamically, including the method and all
that. Could you possibly map it to just the initial entry
point of your app so that it doesn't fire with each request?
Yeah I thought about that... unfor
Frank,
> > Martin, I can't get a HttpServletRequest from Filter.init.
> > I can get a ServletContext... but I can also get that from a
> > ServletContextListener. So I can throw away this silly Filter now.
>
> One reason a filter would be better is you can fully
> construct the URL dynamically,
> Subject: Re: ServletContextListener - how to detect http path of web
> application?
We have a similar sounding problem. We want a ContextListener to be
able to determine the http path and the port, in order to advertise
webapps via ZeroConf MDNS (Rendezvous, Bonjour, whatever th
On Wed, December 21, 2005 1:10 pm, [EMAIL PROTECTED] said:
> Frank, your solution (using the ServletContext) does work. Thanks.
Good news (sigh of relief!)
> Martin, I can't get a HttpServletRequest from Filter.init.
> I can get a ServletContext... but I can also get that from a
> ServletContextL
ssage-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: 21 December 2005 17:28
To: Shepherd, Iain: IT (LDN)
Cc: Tomcat Users List
Subject: Re: ServletContextListener - how to detect http path of web
application?
Iain-
Unless of course you only make this assignment in the init method
T
Iain-
Unless of course you only make this assignment in the init method
Thanks,
Martin-
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Wednesday, December 21, 2005 12:17 PM
Subject: RE: ServletContextListener - how to detect http path of web
application?
Thanks, I mig
solution :-)
Iain
-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: 21 December 2005 17:00
To: Tomcat Users List
Cc: Tomcat Users List
Subject: Re: ServletContextListener - how to detect http path of web
application?
Tim is right, you can't do it directly. You *
Tim is right, you can't do it directly. You *might* be able to construct
it in a roundabout way though...
Let's assumg you know the method, http vs. https, and its always one or
the other. Let's also assume that the element in web.xml
names the application context (i.e., if the URL is http://my
Thanks Tim.
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: 21 December 2005 11:23
To: Tomcat Users List
Subject: Re: ServletContextListener - how to detect http path of web
application?
There is no way to detect the contextPath on servletInit. It can only be
done
There is no way to detect the contextPath on servletInit. It can only be done
after the first request. (Using HttpServletRequest.getContextPath())
-Tim
[EMAIL PROTECTED] wrote:
Hi,
Apols for a newbie question, I didn't have much luck with the archives
or in Google.
In my ServletContextListe
Hi,
Apols for a newbie question, I didn't have much luck with the archives
or in Google.
In my ServletContextListener.contextInitialized method, I need to detect
the public http path of my web app.
i.e. http://servername/approot/
How can I do this?
event.getServletContext().getResource("/") give
11 matches
Mail list logo