On Nov 30, 2013, at 2:29 PM, Philipp Kraus <[email protected]> 
wrote:

> Hello,
> 
> I have got a war file and I would like to install it with a XML file under 
> Catalina/localhost. The content is
> 
> <Context docBase="/usr/share/myWar/mywar-0.0.1.war" privileged="true" 
> allowLinking="true" crossContext="true">
>    <Environment name="HOME" value="/home/mywar/" type="java.lang.String"/>
> </Context>
> 
> 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 <Environment /> 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://<server>:<port>/mywar.

Dan

> 
> Thanks a lot
> 
> Phil


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to