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:
>
-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
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
-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
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]
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
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
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
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
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
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'
"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
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
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
---
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
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
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
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
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
19 matches
Mail list logo