You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jilen <ji...@gmail.com> on 2011/10/27 03:04:04 UTC
"path" attribute in {myapp}/META-INF/context.xml always not work!
in org.apache.catalina.startup.HostConfig.deployWAR(ContextName, File,
String)
i found some code like these
context.setName(cn.getName());
context.setPath(cn.getPath());
context.setWebappVersion(cn.getVersion());
context.setDocBase(file);
...
name and path attribute are override with the war name
So these attribute are not work.
Is tomcat supposed to do that?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: "path" attribute in {myapp}/META-INF/context.xml always not work!
Posted by jilen <ji...@gmail.com>.
Tomcat: 7.0.22 OS:linux Java: OpenJDK 1.6-23
> in org.apache.catalina.startup.HostConfig.deployWAR(ContextName, File,
> String)
>
> i found some code like these
>
> context.setName(cn.getName());
> context.setPath(cn.getPath());
> context.setWebappVersion(cn.getVersion());
> context.setDocBase(file);
> ...
> name and path attribute are override with the war name
> So these attribute are not work.
>
> Is tomcat supposed to do that?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: "path" attribute in {myapp}/META-INF/context.xml always not
work!
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: jilen [mailto:jilen.zhang@gmail.com]
> Subject: Re: "path" attribute in {myapp}/META-INF/context.xml always not work!
> So far as i understand, i have two choice to make my own
> app as root app
> 1. replace the ROOT dir in the appBase with my own app
The strongly recommended way.
> 2. create a Context element in Host element with path=""
The very, very strongly discouraged and outdated way.
Make your life easy - name your webapp ROOT and you're done. No need to complicate things.
- 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 in {myapp}/META-INF/context.xml always not work!
Posted by jilen <ji...@gmail.com>.
On 10/27/2011 09:46 AM, Caldarale, Charles R wrote:
>> From: jilen [mailto:jilen.zhang@gmail.com]
>> Subject: "path" attribute in {myapp}/META-INF/context.xml always not work!
>> name and path attribute are override with the war name
>> So these attribute are not work.
>> Is tomcat supposed to do that?
> Yes; read the doc:
>
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
>
> - 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
>
I have read the doc in detail.
So far as i understand, i have two choice to make my own app as root app
1. replace the ROOT dir in the appBase with my own app
2. create a Context element in Host element with path=""
Is there any other way to have this work done?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: "path" attribute in {myapp}/META-INF/context.xml always not
work!
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: jilen [mailto:jilen.zhang@gmail.com]
> Subject: "path" attribute in {myapp}/META-INF/context.xml always not work!
> name and path attribute are override with the war name
> So these attribute are not work.
> Is tomcat supposed to do that?
Yes; read the doc:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
- 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