I did a bunch of googling before posting my question, but never came
across that post; thanks for listing it; it appears to be exactly what I
need.
Dave
Caldarale, Charles R wrote:
From: David Kerber [EMAIL PROTECTED]
Subject: Re: Context path changes in context.xml not working
Nobody
Running Tomcat 5.5.9 on Windows 2000 server.
I am trying to change the context path of an application, and it works
fine when I put this into my server.xml:
Context path=/wradev/pelican
docBase=e:\TomcatClients\Pelican\webapps\SiteData debug=0
reloadable=true autoDeploy=true
.
If you're using the defaults, then engine-name is
Catalina and hostname is localhost.
HTH
/mde/
--- David Kerber [EMAIL PROTECTED] wrote:
Running Tomcat 5.5.9 on Windows 2000 server.
I am trying to change the context path of an
application, and it works
fine when I put this into my server.xml
xml file located in config/Catalina/localhost. Restart
tomcat and you're done.
--David
David Kerber wrote:
Running Tomcat 5.5.9 on Windows 2000 server.
I am trying to change the context path of an application, and it works
fine when I put this into my server.xml:
Context path
I guess I missed that part about paths - thanks for pointing that out.
How do I rename things to get the 2-level context path? This is an app
I'm migrating from SilverStream to Tomcat, and I don't want to change
the url my users use to connect to it.
David Smith wrote:
Intended behavior
Nobody has any suggestions about setting up a 2-level context path
*without* putting it in the server.xml (it works fine in there)?
Dave
David Kerber wrote:
I guess I missed that part about paths - thanks for pointing that out.
How do I rename things to get the 2-level context path
Did you try it in:
$CATALINA_HOME/conf/engine-name/hostname/appname.xml?
/mde/
--- David Kerber [EMAIL PROTECTED] wrote:
Nobody has any suggestions about setting up a
2-level context path
*without* putting it in the server.xml (it works
fine in there)?
Dave
From: David Kerber [EMAIL PROTECTED]
Subject: Re: Context path changes in context.xml not working
Nobody has any suggestions about setting up a 2-level context path
*without* putting it in the server.xml (it works fine in there)?
I thought I remembered something about this, and went
hello
i would like to know how to set the context path in
tomcat5.5.9 hi
I also read something and a build.properties file
and i dont know how to do this too.
please i need help on this cause i cant see my
application file when i give in the uri
http://localhost:8080/myApp
To add the context path, you need to edit the $TOMCAT_HOME/conf/server.xml file
and these lines:
Host name=www.yourdomainname.com debug=0 unpackWARs=true
Context path=/myApp docBase=/where/you/store/your/apps debug=0
reloadable=true crossContext=true /
/Host
Hope this help...
---Trung
From: Trung Nguyen [mailto:[EMAIL PROTECTED]
Subject: RE: setting the context path in tomcat5.5.9?
To add the context path, you need to edit the
$TOMCAT_HOME/conf/server.xml file and these lines:
This completely ignores the admonition in the Tomcat doc:
Please note that for tomcat 5
: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 04, 2005 9:33 AM
To: Tomcat Users List
Subject: RE: setting the context path in tomcat5.5.9?
From: Trung Nguyen [mailto:[EMAIL PROTECTED]
Subject: RE: setting the context path in tomcat5.5.9?
To add the context path, you
From: Stephen Faustino [mailto:[EMAIL PROTECTED]
Subject: RE: setting the context path in tomcat5.5.9?
my attempts to create a Context in the META-INF/context.xml
were not successful, that is, I could create the context.xml
file but the attributes did not seem to take affect. I could
set
ignore any messages that hijack another thread.
The correct procedure is to create a new message with a new subject.
This will start a new thread.
Mark
tomcat-user-owner
Mbah Tenjoh-Okwen wrote:
hello
i would like to know how to set the context path in
tomcat5.5.9 hi
I also read
servletContext.getRealPath() is real path to the context path + the argument
...
So if you say servletContext.getRealPath(hithere) .. It will return
C:\path\to\tomcat\webapps\tool\hithere
Regards
Guru
-Original Message-
From: Franz-Josef Herpers [mailto:[EMAIL PROTECTED]
Sent: 05
Franz-Josef Herpers wrote:
Hi,
I've a problem when using ServletContext#getRealPath() with Tomcat 5.5.9.
My web application resides under the name tool in the webapps
directory. When I call
servletContext.getRealPath(request.getContextPath() I get the real
path but always with the context
Hi,
Edmund Urbani wrote:
the getRealPath method simply returns a path inside the webapp's
directory. eg. you can do getRealPath(images/someimg.jpg) and get the
actual filesystem path for that file, so you can access it using
java.io.File and do something with it. getRealPath(/) should give
Hi,
I've a problem when using ServletContext#getRealPath() with Tomcat 5.5.9.
My web application resides under the name tool in the webapps
directory. When I call
servletContext.getRealPath(request.getContextPath() I get the real path
but always with the context path added at the end
Andy wrote:
When I request a reload like this -
http://testxtb.example.com/manager/reload?xtb
I get this response-
FAIL - Invalid context path null was specified
However according to this page -
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html
This is a valid syntax
You
Hi All,
I'm trying to configure the manager application with virtual
hosts.
When I request a reload like this -
http://testxtb.example.com/manager/reload?xtb
I get this response-
FAIL - Invalid context path null was specified
However according to this page -
http://jakarta.apache.org
this .xml , recognize these context .
for eg. I want to add a context .=20
Context path=3D/download/temp docBase=3D/qa/applicationroot/temp
/Context
thanks,
sks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
this .xml , recognize these context .
for eg. I want to add a context .=20
Context path=3D/download/temp docBase=3D/qa/applicationroot/temp
/Context
thanks,
sks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
this .xml , recognize these context .
for eg. I want to add a context .=20
Context path=3D/download/temp docBase=3D/qa/applicationroot/temp
/Context
thanks,
sks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
Hi!
I'm preparing to upgrade from tomcat 4.1 to 5.5. I've a lot of apps, which have
a context path with subdirectories (e.g. /dir1/app1 ...) and it seems that
tomcat 5.5 doesn't allow this.
In the tomcat 5.5 docs (.../tomcat-docs/config/context.html) in the description
of path there's
On Fri, May 06, 2005 at 10:07:32AM +0200, Pfingstl Gernot wrote:
: This seems to me to have only context path with has the same value as the name
: of the context.xml file.
: I want to use context.xml files and not put context information into
: server.xml.
: So isn't it possible to depoly apps
; context-path
On Fri, May 06, 2005 at 10:07:32AM +0200, Pfingstl Gernot wrote:
: This seems to me to have only context path with has the same value as the name
: of the context.xml file.
: I want to use context.xml files and not put context information into
: server.xml.
: So isn't it possible to depoly
I am using tomcat5.5.9 and set up my apache connector to route /apps/* to
tomcat.
The problem is I can't deploy any applications to a context path under /apps/.
For example: /apps/jsp-examples
So that this url would work (direct to tomcat)
myserver.com:8080/apps/jsp-examples
or the more friendly
in another application as
part of a JAR that application will end up with another root, such as
http://localhost:8080/mycart/;. So the line above in my filter that
includes the literal simplecart breaks.
I have searched for something related to the context or context path.
All suggestions appreciated
Use HttpServeletRequest.getContextPath() to get the context path.
-Tim
Daniel Watrous wrote:
Hello,
I am have written some filters for a shopcart application. I intend
for parts of this applicaiton to be reused in other web applications
by including it as a JAR file.
For authentication I have
Thanks. That did the trick!
DW
On 4/25/05, Tim Funk [EMAIL PROTECTED] wrote:
Use HttpServeletRequest.getContextPath() to get the context path.
-Tim
Daniel Watrous wrote:
Hello,
I am have written some filters for a shopcart application. I intend
for parts of this applicaiton
Hello,
I am following the information here to add DBCP to my application.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
I am reading to add the Context path=/DBTest ... from the above docs. The
instructions say to .
Configure the JNDI DataSource
://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
I am reading to add the Context path=/DBTest ... from the above docs. The
instructions say to .
Configure the JNDI DataSource in Tomcat by adding a declaration for your
resource to $CATALINA_HOME/conf/server.xml.
Add
better off using
your application-specific WEB-INF\web.xml and META-INF\context.xml
files like so:
your application docbase\META-INF\context.xml would look something like:
Context path=/Foo
docBase=C:/Foo
debug=1 reloadable=true
Resource
auth=Container
name=jdbc
I have looked at the JavaDocs, but I can't find a method that will give me
the context path for a web app:
(i.e. Context path=/abcxyz docBase=...) All I want is the /abcxyz
string precisely as defined in the context tag.
I have tried getPath() from the servletContext, but it returns part
See HttpServletRequest.getContextPath()
J Malcolm wrote:
I have looked at the JavaDocs, but I can't find a method that will give me
the context path for a web app:
(i.e. Context path=/abcxyz docBase=...) All I want is the /abcxyz
string precisely as defined in the context tag.
I have tried
Hello
I've been looking for a way how to obtain ServletContext pah/URL
without a request; eventually I've found thius reply in the Tomcat
mail-archive claiming it is not possible:
http://www.servlets.com/archive/servlet/ReadMsg?msgId=69529listName=tomcat-user
It was 5yrs ago and I wonder whether
As it was 5 years ago ... its the same today.
-Tim
Jaroslav Záruba wrote:
Hello
I've been looking for a way how to obtain ServletContext pah/URL
without a request; eventually I've found thius reply in the Tomcat
mail-archive claiming it is not possible:
Hi,
When I declare this context in server.xml:
Context path=/tomcat/codebar
docBase=${catalina.home}\czwork\codebar
debug=5
reloadable=true
crossContext=false
/Context
the webapp deploys to /tomcat/codebar - great
Hello TC gurus, I am willing to try this again. I am sure this has shown up a
few thousand times but I have just downloaded the TC 5.5 in hopes that my
little JSP app I am dreaming up will run on the servlet server. Here is the
problem: I cannot get the context path right no matter what
server. Here is the
problem: I cannot get the context path right no matter what and the TC
manager just claims: Failed to deploy application at context. I have set the
context path to many different paths but nothing works. I have embedded echo
/ statements all through the build.xml hoping
On Fri, 11 Feb 2005 19:07:27 + (UTC), David W. Brown
[EMAIL PROTECTED] wrote:
Hello Jason, thanks for the speedy reply and help. The only context.xml I can
find is @: /Apache Software Foundation/Tomcat5.5/conf/context.xml the xml
parameter you have quoted below is not present. There are
Hello Tomcat gurus, I am sure this has shown up a few thousand times but I have
just downloaded the TC 5.5 in hopes that my little JSP app I am dreaming up
will run on the servlet server. Here is the problem: I cannot get the context
path right no matter what and the TC manager just claims
Hi,
i have a problem with the Path attribute!
When i write it Path the application running but
not appears in in the manager application!
It´s only appers in Application list!
Context Path=/webapps/JSP_apps docBase=C:\Programme\Apache
Group\Apache2\htdocs\wonline\webapps\JSP_apps
with Context path=?
Hi,
I'm running 5.0.28. I'm using the default
$CATALINA_HOME/conf/server.xml.
I have removed the ROOT and example webapps leaving only admin,
manager
(in server/webapps), and myapp (expanded into $CATALINA_HOME/webapps).
In
$CATALINA_HOME/conf/Catalina/localhost/myapp.xml
org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /myapp from URL
file:/Applications/jakarta-tomcat-5.0.28/webapps/myapp
I searched but could not find any other Host declarations, nor any
instances of 'autoDeploy' in my conf directory. I tried setting every
instance of debug
application at context path /myapp from URL
file:/Applications/jakarta-tomcat-5.0.28/webapps/myapp
I searched but could not find any other Host declarations, nor any
instances of 'autoDeploy' in my conf directory. I tried setting every
instance of debug in server.xml to 9, but upon restart I'm
Context path=. When I start the server I get:
INFO: Installing web application at context path /myapp from...
I then also get the apparently infamous:
[myapp] WARN [main] SettingsFactory.buildSettings(96) | Could not obtain
connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot
Hi,
we have an application that we deploy as .WAR file on Tomcat 5.0.28.
It has a META-INF/context.xml with this content:
Context path=/foo reloadable=false useNaming=true
ResourceLink name=jdbc/myDB global=jdbc/myDB
type=javax.sql.DataSource/ResourceLink
/Context
If our .war file
context path in Tomcat 5.0.28 ?
Hi,
we have an application that we deploy as .WAR file on Tomcat 5.0.28.
It has a META-INF/context.xml with this content:
Context path=/foo reloadable=false useNaming=true
ResourceLink name=jdbc/myDB global=jdbc/myDB
type=javax.sql.DataSource/ResourceLink
Hi,
Is there a way to set a webapp to use the root context path in Tomcat
5.5.3. For example, I want to access by webapp named mywebapp by
using this url:
http://mydomain.com/
instead of this:
http://mydomain.com/mywebapp/
In a J2EE EAR file, I can set the webapp to use the root context path
webapp WAR
file to ROOT.war. I'm looking at a solution similar on a typical EAR
file deployment on a J2EE app (i.e. Jboss) where I can specify my
webapp to use the root context path in the application.xml file.
On Fri, 5 Nov 2004 13:00:15 +0100, Nick Pellow
[EMAIL PROTECTED] wrote:
Hi Jojo,
I
Here is what worked for me (Tomcat 3.3.2 )
--
Context path=
docBase=webapps/Base
debug=0
reloadable=true
LogSetter name=Base.log
path=logs/Base.log
servletLogger=true
On Fri, 5 Nov 2004 20:23:30 +0800, Jojo Paderes [EMAIL PROTECTED] wrote:
Here's my context.xml file:
Context displayName=My Web App
path=
docBase=mywebapp.war
reloadable=true
useNaming=true
debug=5
unpackWAR=true
/Context
Seems to be not
[mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 5. November 2004 13:24
An: [EMAIL PROTECTED]
Betreff: Re: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Here's my context.xml file:
Context displayName=My Web App
path=
docBase=mywebapp.war
reloadable=true
This was answered on this list last week. So it's in the archive:
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
pache.org
From memory I think you get rid of the ROOT webapp and set the context path
of mywebapp to / ?
-Original Message-
From: Jojo Paderes [mailto:[EMAIL
:
This was answered on this list last week. So it's in the archive:
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
pache.org
From memory I think you get rid of the ROOT webapp and set the context path
of mywebapp to / ?
-
To unsubscribe
Hi Remy,
Would this mean that the path and docBase attributes are of no use
when configured in the META-INF/context.xml in WAR files?
If that is the case, then we need to set these attributes in the
$CATALINA_HOME/conf/server.xml if we want to customize the context
path of our web apps
Remy, the server config reference at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html
says, Each such Context MUST have a unique context path, which is defined
by the path attribute which implies that we must include the path attribute
in a Context, wherever it is configured
Hi,
Remy, the server config reference at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html
We're talking about Tomcat 5.5, not 5.0, and about a specific deployment scenario.
Yoav
says, Each such Context MUST have a unique context path, which is defined
by the path attribute
now. A path is of
course still required, but the user doesn't have to specify it, as
Tomcat will now deduce it in some cases.
Yoav
says, Each such Context MUST have a unique context path, which is
defined
by the path attribute which implies that we must include the path
attribute
That's what I thought, but it still only deplot the app to /bar.
I'm using tomcat 4.1.24 so not sure if that version is too old?
Hi,
Include in your WAR file a META-INF/context.xml file with a Context
element like
Context path=/foo/bar docBase=bar.war /
Yoav Shapira
Millennium Research Informatics
: Wednesday, September 22, 2004 10:21 AM
Subject: RE: context path for a war file
That's what I thought, but it still only deplot the app to /bar.
I'm using tomcat 4.1.24 so not sure if that version is too old?
Hi,
Include in your WAR file a META-INF/context.xml file with a Context
element like
Hi tomcat-users,
I'm trying to upload a war file (called bar.war) through the tomcat manager.
I want the context path to be /foo/bar. However tomcat initialises it to
/bar.
How do I get round this?
Thanks,
JS.
_
Want to block
Hi,
Include in your WAR file a META-INF/context.xml file with a Context
element like
Context path=/foo/bar docBase=bar.war /
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: J S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 3:39 PM
To: [EMAIL
Context configuration is a usefull
option.
Comments ?
regards
Peter
Remy Maucherat schrieb:
On Wed, 1 Sep 2004 13:19:48 -0500, Jonathan Eric Miller
[EMAIL PROTECTED] wrote:
In Tomcat 4.0 and 5.0, I had the following in my server.xml file.
Context path= docBase=ROOT debug=0 reloadable=true
On Thu, 02 Sep 2004 10:04:13 +0200, Peter Rossbach [EMAIL PROTECTED] wrote:
Hello Remy,
ok, when we not want that Context placed at server.xml than we remove
the configuration
elements at Catalina.createStartDigester.
Ok, but:
- the webapp will not be handled by hot deployment at all
-
Remy Maucherat schrieb:
On Thu, 02 Sep 2004 10:04:13 +0200, Peter Rossbach [EMAIL PROTECTED] wrote:
Hello Remy,
ok, when we not want that Context placed at server.xml than we remove
the configuration
elements at Catalina.createStartDigester.
Ok, but:
- the webapp will not be handled by
In Tomcat 4.0 and 5.0, I had the following in my server.xml file.
Context path= docBase=ROOT debug=0 reloadable=true/
However, if I try to use this in Tomcat 5.5, I receive the following error
in catalina.out. Does anyone know if I need to change something to get it to
work with Tomcat 5.5
Hi,
Is there another context configured for the path?
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 2:20 PM
To: Tomcat User List
Subject: Context path= docBase=ROOT... fails
Nope. The same server.xml works fine in Tomcat 5.0.25.
Jon
- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 1:29 PM
Subject: RE: Context path= docBase=ROOT... fails in Tomcat 5.5?
Hi,
Is there another
Miller [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 2:37 PM
To: Tomcat Users List
Subject: Re: Context path= docBase=ROOT... fails in Tomcat 5.5?
Nope. The same server.xml works fine in Tomcat 5.0.25.
Jon
- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat
, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 2:16 PM
Subject: RE: Context path= docBase=ROOT... fails in Tomcat 5.5?
Hi,
Try removing the debug attribute, as that's not in the standard
Context in 5.5.0 (Loggers are gone).
In general, if you copy
, 2004 10:19 PM
To: Tomcat Users List
Subject: Re: Context path= docBase=ROOT... fails in Tomcat 5.5?
I tried it without the debug attribute and the result is the
same. Actually,
the server.xml file that comes with Tomcat 5.5 has a lot of
debug attributes
in it.
One thing that I've
On Wed, 1 Sep 2004 13:19:48 -0500, Jonathan Eric Miller
[EMAIL PROTECTED] wrote:
In Tomcat 4.0 and 5.0, I had the following in my server.xml file.
Context path= docBase=ROOT debug=0 reloadable=true/
However, if I try to use this in Tomcat 5.5, I receive the following error
in catalina.out
Hi.
Someone knows how Tomcat 4.x (or 5.x) using mod_jk2 can be configured to
merge tomcat context path and httpd path like mod_jk do.
Thanks in advance
LFung
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
the jsp-example.xml contents:
---
Context path=/je docBase=jsp-examples
debug=0 privileged=true
/Context
---
I did this because I noticed the balancer app has a
balancer.xml.
It seems like it should work, right? But it doesn't.
The URL, http://localhost:8080/je;, gives me
-examples
directory. My intent was to be able to access the
jsp-examples app with this URL:
http://localhost:8080/je;
Here's the jsp-example.xml contents:
---
Context path=/je docBase=jsp-examples
debug=0 privileged=true
/Context
---
I did this because I noticed the balancer app
On Thu, 12 Aug 2004, Jacob Kjome wrote:
| To get the context path at init time, try this
Thanks..! Good to see that others (log4j!!) have this problem!
However, I have been thinking along these lines (the second idea
presented) already, but it then again boils down to that you really
Hi,
No, not all of us will be happy. And it's not simple.
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: Endre Stølsvik [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 5:27 AM
To: Tomcat Users List
Subject: Re: SOLVED: How to get the context path
Millennium Research Informatics
-Original Message-
From: Endre Stølsvik [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 5:27 AM
To: Tomcat Users List
Subject: Re: SOLVED: How to get the context path for a web application?
On Thu, 12 Aug 2004, Jacob Kjome wrote:
| To get the context
On Fri, 13 Aug 2004, Shapira, Yoav wrote:
| Hi,
| And of course, since you can get the source for JSR154, there's nothing
| preventing you from adding this method and running with a custom servlet
| jar in your container. (It's at
| http://cvs.apache.org/viewcvs.cgi/jakarta-servletapi-5/jsr154/,
Per the servlet spec, a j2ee app isn't required to have an app path.
The entire war file can be deployed remotely and run without ever being
unpacked. In a case like that, there would be no path to the application.
On Friday 13 August 2004 10:01 am, Endre Stølsvik wrote:
But, why wouldn't all
Millennium Research Informatics
-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 10:12 AM
To: Tomcat Users List
Subject: Re: SOLVED: How to get the context path for a web application?
Per the servlet spec, a j2ee app isn't required to have an app
To: Tomcat Users List
Subject: Re: SOLVED: How to get the context path for a web
application?
Per the servlet spec, a j2ee app isn't required to have an
app path. The entire war file can be deployed remotely and
run without ever being
unpacked. In a case like that, there would be no path
contextPath = path.substring(0, path.lastIndexOf(/));
contextPath = contextPath.substring(contextPath.lastIndexOf(/) +
1);
This looks like a reasonable hack, but isn't it true that the filesystem
path and the context path don't have to match? For example, I can map to
/webapps
Quoting David Wall [EMAIL PROTECTED]:
contextPath = path.substring(0, path.lastIndexOf(/));
contextPath = contextPath.substring(contextPath.lastIndexOf(/) +
1);
This looks like a reasonable hack, but isn't it true that the filesystem
path and the context path don't have
On Wed, 11 Aug 2004, David Wall wrote:
| The cause for some of these specs is the fact servlet containers aren't
| required to run on file systems. For example, they may run entirely
| inside a DBMS (and Oracle had such a container for a while), in which
| case you must deploy in a packed
To get the context path at init time, try this
from:
http://cvs.apache.org/viewcvs.cgi/logging-log4j-sandbox/src/java/org/apache/log4j/servlet/InitShutdownController.java
/**
* Retrieves the context path of the web application from the servlet
context.
*
* @param context the current
hai
use
request.getContextPath()
Rajesh
Jacob Kjome wrote:
To get the context path at init time, try this
from:
http://cvs.apache.org/viewcvs.cgi/logging-log4j-sandbox/src/java/org/apache/log4j/servlet/InitShutdownController.java
/**
* Retrieves the context path of the web application
OHH!!. How could we be so stupid???
RTFT! (that last 'T' would be 'thread')
-Original Message-
From: Rajesh [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 12, 2004 8:47 AM
To: Tomcat Users List
Subject: Re: SOLVED: How to get the context path for a web
application?
hai
On Tue, 10 Aug 2004, Shapira, Yoav wrote:
|
| Hi,
|
| Agreed, but my follow-up question was if there was such a call to be
| done
| using a ServletContext/ServletConfig object so that you can get the
| context
| path in initialization servlets, etc., before a request comes
: How to get the context path for a web application?
On Tue, 10 Aug 2004, Shapira, Yoav wrote:
|
| Hi,
|
| Agreed, but my follow-up question was if there was such a call to be
| done
| using a ServletContext/ServletConfig object so that you can get the
| context
| path in initialization servlets, etc
is not
a hard-drive path.
Nobody cares if this maps to a file system or not. If your application
needs to create an URL that will take someone to a page on your site (let's
say it's the /login.jsp page), we need to be able to set the protocol,
domain, port and context path that will appear in front
: Monday, August 09, 2004 10:49 PM
To: Tomcat Users List
Subject: How to get the context path for a web application?
I need to find a way to get the context path of the current web
application.
I would like to to it using the HttpSession, HttpServletRequest or
response.
I tried
request.getContextPath();
Is there a way to do it when not serving a web page? Like in a startup
servlet that has a ServletConfig/Context, but doesn't have a request? This
way, the context could be retrieved once and cached and used in situations
unrelated to processing a specific HTTP
suggest
you check the API docs for more information.
Robert S. Harper
801.265.8800 ex. 255
-Original Message-
From: David Wall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 10:07 AM
To: Tomcat Users List
Subject: Re: How to get the context path for a web application
. I
suggest
you check the API docs for more information.
But do any of those return the context path? I didn't see it anywhere in
the javadocs.
David
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
to get the
context. One thing to remember is that this does not get called until the
servlet is initialized and would be invalidated when it is destroyed. I
suggest
you check the API docs for more information.
But do any of those return the context path? I didn't see it anywhere
Someone on the list suggested Request.getContextPath() and it works like a
charm. Thanks to all.
Agreed, but my follow-up question was if there was such a call to be done
using a ServletContext/ServletConfig object so that you can get the context
path in initialization servlets, etc., before
Hi,
Agreed, but my follow-up question was if there was such a call to be
done
using a ServletContext/ServletConfig object so that you can get the
context
path in initialization servlets, etc., before a request comes in.
No, and an archive search would reveal past discussions around this
issue
1 - 100 of 201 matches
Mail list logo