Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Deploy on tomcat with a name that differs from the warfile name (http://www.velocityreviews.com/forums/t750881-deploy-on-tomcat-with-a-name-that-differs-from-the-warfile-name.html)

jaap 07-04-2011 09:18 AM

Deploy on tomcat with a name that differs from the warfile name
 
Hi,

I want te deploy an application on Tomcat with a name that differs from
the warfile name. According to the documentation I expected to get
http://localhost:8080/campingserver/ to react to campingserver-1.0.2.war
in the webapp folder when I have the following context.xml file in META-INF:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/campingserver/">
</Context>

But this does not work, the URL is still
http://localhost:8080/campingserver-1.0.2/
Any idea how to acomplish it?

Arne Vajh°j 07-22-2011 12:50 AM

Re: Deploy on tomcat with a name that differs from the warfile name
 
On 7/4/2011 5:18 AM, jaap wrote:
> I want te deploy an application on Tomcat with a name that differs from
> the warfile name. According to the documentation I expected to get
> http://localhost:8080/campingserver/ to react to campingserver-1.0.2.war
> in the webapp folder when I have the following context.xml file in
> META-INF:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Context path="/campingserver/">
> </Context>
>
> But this does not work, the URL is still
> http://localhost:8080/campingserver-1.0.2/
> Any idea how to acomplish it?


http://tomcat.apache.org/tomcat-7.0-...g/context.html says:

"path
....
The value of this field must not be set except when statically defining
a Context in server.xml, as it will be inferred from the filenames used
for either the .xml context file or the docBase."

so I am not surprise that it is not working.

If you were using a full Java EE server you could use an ear file and
specify the path there.

With Tomcat I think the easiest solution is the low tech solution
of renaming before copying.

Arne



All times are GMT. The time now is 05:17 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.