Answer the question
In order to leave comments, you need to log in
How to change the root directory of servlets?
Hello everyone
How can I change the root directory of servlets? (tomcat 8)
tomcat start page says that it is located in /var/lib/tomcat8/webapps/, but for example I want to change it to /home/user/awsome_app
in the configs of this configuration, I didn’t find it, maybe someone here knows how this is done , and is it possible?
Thank you
Answer the question
In order to leave comments, you need to log in
in the conf folder of the tomcat there is a server.xml file in which you can find the following lines
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
...
</Host>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/myApp" docBase="/home/user/awesome_app"></Context>
</Host>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question