You could implement a filter that passes on a request wrapper. Then
just override the getContextPath() method to return "".
Eric Jain wrote:
> Is it possible to trick an application into believing that it is the
> ROOT application (i.e. getContextPath returns ""), e
Is it possible to trick an application into believing that it is the ROOT
application (i.e. getContextPath returns ""), even when it isn't?
The reason for this is that managing virtual hosts with Tomcat can be a bit
cumbersome, and some management applications won't work in
(and their appear the ContextPath: /test )
is this the normal way of tomcat working? if so all is ok thanks for all
- Original Message - From: "mast" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, October 31, 2006 11:04 PM
Subject: Re: getContextPath
> From: mast [mailto:[EMAIL PROTECTED]
> Subject: Re: getContextPath
>
> /usr/local/tomcat5/webapps/users1/ROOT/test/test.jsp
> /usr/local/tomcat5/webapps/users1/test/test.jsp
>
> tomcat use the second one (and their appear the ContextPath: /test )
> is this the norm
: /test )
is this the normal way of tomcat working? if so all is ok thanks for all
- Original Message -
From: "mast" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, October 31, 2006 11:04 PM
Subject: Re: getContextPath
Hmm well it seem i have made a
> From: mast [mailto:[EMAIL PROTECTED]
> Subject: Re: getContextPath
>
> but i had a WEB-INF and META-INF in the same directory as the
> ROOT too and they seem to have been taken instead of the one
> in the ROOT one (is it normal?)
Not sure what you mean by "normal"
e make you loose time.
- Original Message -
From: "mast" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, October 31, 2006 10:51 PM
Subject: Re: getContextPath
>From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat U
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, October 31, 2006 10:37 PM
Subject: RE: getContextPath
Do you have a test.xml lurking around in conf/[engine]/[host] in one of
them? Would that test.xml have a element with a doc
> From: mast [mailto:[EMAIL PROTECTED]
> Subject: Re: getContextPath
>
> in the 5.5.17 version my app is under the ROOT directory yes
> (that s the correct way like we told before no ?)
Depends on what you mean by "under". If your app IS the ROOT directory,
then getCo
List"
Sent: Tuesday, October 31, 2006 9:14 PM
Subject: RE: getContextPath
From: mast [mailto:[EMAIL PROTECTED]
Subject: Re: getContextPath
i use a simple jsp file with :
ContextPath: <%= request.getContextPath() %>
ServletPath: <%= request.getServletPath() %>
with a 5.5.9 serve
> From: mast [mailto:[EMAIL PROTECTED]
> Subject: Re: getContextPath
>
> i use a simple jsp file with :
> ContextPath: <%= request.getContextPath() %>
> ServletPath: <%= request.getServletPath() %>
>
> with a 5.5.9 server
> ContextPath: /test
> Servl
i use a simple jsp file with :
ContextPath: <%= request.getContextPath() %>
ServletPath: <%= request.getServletPath() %>
- Original Message -
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, October 31, 20
> From: mast [mailto:[EMAIL PROTECTED]
> Subject: Re: getContextPath
>
> with a 5.5.9 server
> ContextPath: /test
> ServletPath: /test.jsp
>
> with a 5.517 server
> ContextPath:
> ServletPath: /test/test.jsp
What APIs are you using to determine ContextPath and
/test.jsp
QueryString: null
- Original Message -
From: "mast" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Monday, October 30, 2006 12:31 AM
Subject: Re: getContextPath
>
There was a change at some point that resulted in any directory under
the webapps d
mast wrote:
> Hmm i understand but this configuration was invalid in 5.5.9 too so they
> did some change no ?
This configuration has always been invalid but if you use it then you
will see different behaviour as a side-effect of adding the deploy any
directory in appBase feature which is new.
Mar
There was a change at some point that resulted in any directory under
the webapps directory being deployed as an application. You would see
this behaviour if you had configured a host appBase to be the same as
a context docBase - a configuration that is invalid.
Mark
---
mast wrote:
> with two server.xml identical with a test.jsp on a directory test on 5.5.9
> TranslatedPath: null
> ContextPath: ServletPath: /test/test.jsp
> PathInfo: null
> RequestURI: /test/test.jsp
> QueryString: null
>
> on 5.5.20
>
> ContextPath: /test
> ServletPath: /test.jsp
> PathInfo: nu
Examples please. I suspect it is as a result of the configuration
changes you have been making.
Mark
with two server.xml identical with a test.jsp on a directory test
on 5.5.9
TranslatedPath: null
ContextPath:
ServletPath: /test/test.jsp
PathInfo: null
RequestURI: /test/test.jsp
QueryStrin
mast wrote:
> i return with my first problem :=20
> in a tomcat 5.5.9 when i use the request.getServletPath() and=20
> request.getContextPath()
> i get different answer than a tomcat 5.5.19 (or 20), has this function=20
> change in the new tomcat?
Examples please. I suspect it is as a result of t
i return with my first problem :=20
in a tomcat 5.5.9 when i use the request.getServletPath() and=20
request.getContextPath()
i get different answer than a tomcat 5.5.19 (or 20), has this function=20
change in the new tomcat?
-
Bill, Daryl,
Many thanks for your email. I appreciate the feedback and information as
well as Daryl's offer to collate these issues from developers and users.
Should be very helpful to have.
Thanks again,
Carlin
On 5/14/06, Darryl Miles <[EMAIL PROTECTED]> wrote:
Bill Barker wrote:
> "Carlin
Bill Barker wrote:
"Carlin Rogers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Pretty much all of them have been discussed at length on [EMAIL PROTECTED] and/or
BZ. The archives are your friend :).
Is there information on any other areas of the spec that Tomcat has chosen
not
> the Tomcat implementation for HttpServletRequest getContextPath() returns
> a
> decoded string. The 2.3 and 2.4 spec and the API documentation state that
> "the container does not decode this string." As an application programmer,
> it is difficult to determine the best way to ha
Hi Tomcat Users,
I was wondering if anyone knows of documentation or forum discussions around
areas of the Java Sevlet Spec that Tomcat does not support. I noticed that
the Tomcat implementation for HttpServletRequest getContextPath() returns a
decoded string. The 2.3 and 2.4 spec and the API
hv @ Fashion Content wrote:
> How to you get getContextPath() to return blank for a webapp ?
Make that webapp the default Context for the applicable Host.
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.
How to you get getContextPath() to return blank for a webapp ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Your answer
For servlets in the default (root) context, getContextPath method returns
""...
Sorry for the thread hike!
Martin-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Good Evening Gentlemen:
How do I load admin.war in Tomcat 5.5.7?
Many Thanks,
Martin-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hv @ Fashion Content wrote:
> Is there a way have getContextPath return "" other than setting it up as
> ROOT context
Not that I know of -- why is the obvious "fix" undesirable?
> I have that old problem of rewriting URLs to get rid of the pesky context
>
Is there a way have getContextPath return "" other than setting it up as
ROOT context
I seem to remember working, but it
doesn't seem to have any effect in 5.5.9
I have that old problem of rewriting URLs to get rid of the pesky context
path.
30 matches
Mail list logo