Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Deploy on tomcat with a name that differs from the warfile name

Reply
Thread Tools

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

 
 
jaap
Guest
Posts: n/a
 
      07-04-2011
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?
 
Reply With Quote
 
 
 
 
Arne Vajh°j
Guest
Posts: n/a
 
      07-22-2011
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Deploy won't deploy Masterpage.master GaryDean ASP .Net 1 04-14-2009 01:50 AM
Permanent deploy on Tomcat Gawelek Java 0 10-23-2003 05:36 PM
deploy war file with load-on-startup in Tomcat 4.1.12 MARunner Java 0 10-21-2003 02:47 PM
Tomcat Manager Not Able To (re)Deploy New War Richard Java 0 08-04-2003 08:23 PM



Advertisments