Re: ServletContext.getContextPath()

2007-10-04 Thread Terence M. Bandoian
Hi- My mistake. I deleted the message before I replied and missed that this needed to take place during startup. -Terence M. Bandoian [EMAIL PROTECTED] > > Subject: > Re: ServletContext.getContextPath() > From: > Christopher Schultz <[EMAIL PROTECTED]> > Date: >

Re: ServletContext.getContextPath()

2007-10-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brendan, Brendan MacLean wrote: > That's the conclusion I'd come to, but was hoping some Tomcat guru could > tell me different. Unfortunately, request.getContextPath() is not available > "before the first request" though this is indeed how we are ini

Re: ServletContext.getContextPath()

2007-10-04 Thread Brendan MacLean
That's the conclusion I'd come to, but was hoping some Tomcat guru could tell me different. Unfortunately, request.getContextPath() is not available "before the first request" though this is indeed how we are initializing our knowledge of this setting at the moment. Sounds like we'll have to wait

Re: ServletContext.getContextPath()

2007-10-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Terence, Terence M. Bandoian wrote: > request.getContextPath()? During startup? :( I don't believe you can do this through v2.4 of the the Servlet API, unfortunately. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: U

Re: ServletContext.getContextPath()

2007-10-04 Thread Terence M. Bandoian
request.getContextPath()? -Terence M. Bandoian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: ServletContext.getContextPath()

2007-10-03 Thread Brendan MacLean
It looks like the method ServletContext.getContextPath() was added in version 2.5 of the Servlet API (supported by Tomcat 6.0), but was not present in version 2.4 (supported by Tomcat 5.5). Is there any way to get this information at webapp load time, i.e. inside a

Re: Can't find ServletContext.getContextPath()

2007-08-06 Thread Christopher Schultz
izer.java:33: cannot find symbol > symbol : method getContextPath() > location: interface javax.servlet.ServletContext > log.write("AppInitializer::ContextInitializer: context path='" + > sc.getContextPath() + "'"); > > Why is it not finding th

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? &g

Re: Can't find ServletContext.getContextPath()

2007-08-04 Thread aladdin
r at least a couple of years of doing > >> this, this is the first time I've seen a disconnect between Tomcat and > >> Sun's official documentation. > > > > ServletContext.getContextPath() was introduced in the 2.5 spec so > > you'll need to use Tomcat 6 or

Re: Can't find ServletContext.getContextPath()

2007-08-04 Thread David Smith
onnect between Tomcat and Sun's official documentation. ServletContext.getContextPath() was introduced in the 2.5 spec so you'll need to use Tomcat 6 or later to make use of it. Mark Hi Mark. I had the thought it might be in servlet spec 2.5 and I tried to check, but it'

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
the first time I've seen a disconnect between Tomcat and Sun's official > documentation. ServletContext.getContextPath() was introduced in the 2.5 spec so you'll need to use Tomcat 6 or later to make use of it. Mark ---

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread aladdin
location: interface javax.servlet.ServletContext > > log.write("AppInitializer::ContextInitializer: context path='" + > > sc.getContextPath() + "'"); > > > > Why is it not finding the function (and only the function) > > ServletC

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread aladdin
s, I get: > > ./src/utils/AppInitializer.java:33: cannot find symbol > > symbol : method getContextPath() > > location: interface javax.servlet.ServletContext > > log.write("AppInitializer::ContextInitializer: context path='" + > > sc.getContext

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread David Smith
uot; + sc.getContextPath() + "'"); Why is it not finding the function (and only the function) ServletContext.getContextPath()? It's the first time I've used this function, but it is typed (I think; maybe I&#x

Re: Can't find ServletContext.getContextPath()

2007-08-03 Thread David Smith
ContextPath() + "'"); Why is it not finding the function (and only the function) ServletContext.getContextPath()? It's the first time I've used this function, but it is typed (I think; maybe I'm

Can't find ServletContext.getContextPath()

2007-08-03 Thread aladdin
log.write("AppInitializer::ContextInitializer: context path='" + sc.getContextPath() + "'"); Why is it not finding the function (and only the function) ServletContext.getContextPath()? It's the first time I've used this function, but it is typed (I