Reputation: 2346
I have a java web service application, i created a .WAR file. and now i have loaded .WAR file in a folder that is in a root for example
/mytestdir/mywebapp.WAR
now i want my tomcat5 to run this file that is out of tomcat5 webapps directry. Please help me how can i run this .WAR that i should be able to access like this
http://www.mysite.com:8080/mywebapp
in .WAR file i have a code that needs to access some root level folders.
this is my first deployment.
Upvotes: 0
Views: 974
Reputation: 62864
You have to create a Tomcat Context.
In order to do so, open TOMCAT_HOME/conf/server.xml
and add a Context
that will point to the war file location. For example:
<Context path="/MyApplication" docBase="/mytestdir/mywebapp.WAR" reloadable="false" />
Then, restart your Tomcat instance and you're done.
Upvotes: 2
Reputation: 462
You should change your config.xml
Smth, like this
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/mywebapp" docBase="/mytestdir/mywebapp.WAR">
Upvotes: 0