top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Install war with xml and define environment values

+2 votes
181 views

I have got a war file and I would like to install it with a XML file under Catalina/localhost. The content is
The war uses always ${user.home}, how can I change this in mywar.xml ?

At next I would like to get access of this servlet with https://myserver/mywar, at the moment I must use https://myserver/mywar-0.0.1 how can I change the URL?

posted Nov 30, 2013 by Luv Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

The war uses always ${user.home}, how can I change this in mywar.xml ?

What exactly do you mean? How is the app using this?

Setting an tag here is just going to expose the value through JNDI. Your application will need to be looking for the value through JNDI, to pick this up.

At next I would like to get access of this servlet with https://myserver/mywar, at the moment I must use https://myserver/mywar-0.0.1 how can I change the URL?

The name of the context path is determined by the name of your WAR file or XML deployment descriptor. So rename the appropriate file (war file or xml file).

Based on your example above, if you have the file "conf/Catalina/localhost/mywar.xml", you should have the application available at https://myserver/mywar.

answer Nov 30, 2013 by Naveena Garg
Similar Questions
+1 vote

Is there anyway to extract an image that is uploaded in a war after it is deployed? How can I pull out my images then re upload after I change out a newer version of my war.

...