Re: Can't find ServletContext.getContextPath()

2007-08-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Aladdin, aladdin wrote: > I have the following two lines of code in a context listener: > > ServletContext sc= e.getServletContext(); // e is a ServletContextEvent > log.write("AppInitializer::ContextInitializer: context name='" + > sc

Re: Can't find ServletContext.getContextPath()

2007-08-04 Thread Mark Thomas
David Smith wrote: > I had the thought it might be in servlet spec 2.5 and I tried to check, > but it's not up on the tomcat 6 docs site like servlet spec apis in > previous versions. There's a link in the tomcat 6 docs to the servlet > api, but it doesn't work. I suspect it's a left-over from wh

Re: Can't find ServletContext.getContextPath()

2007-08-04 Thread Len Popp
Yes, ServletContext.getContextPath is in 6.0. -- Len On 8/4/07, aladdin <[EMAIL PROTECTED]> wrote: > Also that link says 2.4 Java API, not 2.5. Perhaps another indicator of an > artifact of earlier versions? > > But, y'all are confident getContextPath is in Tomcat 6.0? > > On Saturday 04 August

Re: Can't find ServletContext.getContextPath()

2007-08-04 Thread aladdin
Also that link says 2.4 Java API, not 2.5. Perhaps another indicator of an artifact of earlier versions? But, y'all are confident getContextPath is in Tomcat 6.0? On Saturday 04 August 2007 08:43, David Smith wrote: > Mark Thomas wrote: > > aladdin wrote: > >> If you go here (Sun's official doc

Re: Can't find ServletContext.getContextPath()

2007-08-04 Thread David Smith
Mark Thomas wrote: aladdin wrote: If you go here (Sun's official docs): http://java.sun.com/javaee/5/docs/api/ you'll find it under the ServletContext interface. However, not being one to argue with the obvious, I'm surely going to take your advice, and, in fact, thank you very much fo

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread Bill Barker
"Mark Thomas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > aladdin wrote: >> Hmmm! One other thing, if you please. There is no "name" attribute that >> I >> can find under the Context entry on the Tomcat website. If I use >> getServletContextName(), where does the name come f

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread Mark Thomas
aladdin wrote: > Hmmm! One other thing, if you please. There is no "name" attribute that I > can find under the Context entry on the Tomcat website. If I use > getServletContextName(), where does the name come from? Of the top of my head, no idea. Have you tried looking at the source code? M

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread Mark Thomas
aladdin wrote: > If you go here (Sun's official docs): > > http://java.sun.com/javaee/5/docs/api/ > > you'll find it under the ServletContext interface. However, not being one to > argue with the obvious, I'm surely going to take your advice, and, in fact, > thank you very much for it. > > Ca

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread aladdin
Hmmm! One other thing, if you please. There is no "name" attribute that I can find under the Context entry on the Tomcat website. If I use getServletContextName(), where does the name come from? Thanks some more, Allen On Friday 03 August 2007 19:42, David Smith wrote: > Doh! > > Looks like

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread aladdin
If you go here (Sun's official docs): http://java.sun.com/javaee/5/docs/api/ you'll find it under the ServletContext interface. However, not being one to argue with the obvious, I'm surely going to take your advice, and, in fact, thank you very much for it. Can you post the URL to the Tomcat

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread David Smith
Doh! Looks like you already know about getServletContextName(). getContextPath() still doesn't exist. If getContextPath() is what I think it is, it's only available in ServletRequest. --David aladdin wrote: I have the following two lines of code in a context listener: ServletCont

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread David Smith
Could be because ServletContext doesn't have that method. You might want to try using getServletContextName(). The Servlet API is available online at the tomcat website. --David aladdin wrote: I have the following two lines of code in a context listener: ServletContext sc= e.getServ

Can't find ServletContext.getContextPath()

2007-08-03 Thread aladdin
I have the following two lines of code in a context listener: ServletContext sc= e.getServletContext(); // e is a ServletContextEvent log.write("AppInitializer::ContextInitializer: context name='" + sc.getServletContextName() + "'"); log.write("AppInitializer::ContextIniti