You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jakub 1983 <jj...@gmail.com> on 2013/04/15 01:20:45 UTC
path attribute from Context.xml is not working
tomcat is started by script:
set "CATALINA_HOME=C:\test\apache-tomcat-7.0.39"
set "CATALINA_BASE=C:\test\catalina_base"
call C:\test\apache-tomcat-7.0.39\bin\catalina.bat start
in file *someConf*.xml under directory
C:\test\catalina_base\conf\Catalina\localhost
I define path:
<Context *docBase*="C:\externaltests\test1\exploded" *path*="/someConf*Path*"
/>
but application is still available only under /someConf derived from file
name, not from path attribute.
"*docBase *is not located under the
Host<http://tomcat.apache.org/tomcat-7.0-doc/config/host.html>'s
appBase" as doc requires (part of server.xml):
<Host name="localhost" *appBase*="C:\test\catalina_base\webapp"
unpackWARs="true" autoDeploy="false">
maybe path would be taken into consideration, if I would also set
autoDeploy="false" deployOnStartup="false"
but how can I then start an app ?
how can I make tomcat to use path attribute form Context element ?
I tried to do as described under
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes
and under
http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Common_Attributes
Re: path attribute from Context.xml is not working
Posted by Jakub 1983 <jj...@gmail.com>.
Chuck, thank you for your help.
Asterisks where from bolding as Neven wrote.
When Context is defined in server.xml it's path attribute works fine.
Actually I have read, but not understood doc. I concentrated on second part
of sentace saying "unless either the docBase is not located under the
Host<http://tomcat.apache.org/tomcat-7.0-doc/config/host.html>'s
appBase" which was true in my case, but somehow I missed unfulfilled
precondition.
Thx once again, regards ,
Jakub
On Mon, Apr 15, 2013 at 1:28 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:
> > From: Jakub 1983 [mailto:jjakub83@gmail.com]
> > Subject: path attribute from Context.xml is not working
>
> > in file *someConf*.xml under directory
> > C:\test\catalina_base\conf\Catalina\localhost
> > I define path:
>
> > <Context *docBase*="C:\externaltests\test1\exploded"
> *path*="/someConf*Path*"
> > />
>
> (For curiosity's sake, what are those silly asterisks doing in your
> config?)
>
> You appear to have not read the description of the path attribute in the
> <Context> doc:
>
> This attribute must only be used when statically defining a Context in
> server.xml.
>
> > how can I make tomcat to use path attribute form Context element ?
>
> You can't, and don't try. Change the name of the .xml file to the desired
> path.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail and
> its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
RE: path attribute from Context.xml is not working
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Neven Cvetkovic [mailto:neven.cvetkovic@gmail.com]
> Subject: Re: path attribute from Context.xml is not working
> I believe asterisks are formated by the mailing list software after bolding
> a selection of text ... so we should safely ignore them ;)
Which is another reason to use plain text on mailing lists. Even Outlook can do that.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: path attribute from Context.xml is not working
Posted by Neven Cvetkovic <ne...@gmail.com>.
I believe asterisks are formated by the mailing list software after bolding
a selection of text ... so we should safely ignore them ;)
RE: path attribute from Context.xml is not working
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jakub 1983 [mailto:jjakub83@gmail.com]
> Subject: path attribute from Context.xml is not working
> in file *someConf*.xml under directory
> C:\test\catalina_base\conf\Catalina\localhost
> I define path:
> <Context *docBase*="C:\externaltests\test1\exploded" *path*="/someConf*Path*"
> />
(For curiosity's sake, what are those silly asterisks doing in your config?)
You appear to have not read the description of the path attribute in the <Context> doc:
This attribute must only be used when statically defining a Context in server.xml.
> how can I make tomcat to use path attribute form Context element ?
You can't, and don't try. Change the name of the .xml file to the desired path.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org