Tomcat – How to deploy application outside web server

All web application WAR file, JSP file should be deployed in public folder of the web server (Tomcat). The public folder of the tomcat is webapps. We can deploy application outside the web server tomcat by using context. Context allows us to keep our application folder at any location and map to the context path of the web application.

To define our context of web application, we have to do entry in context.xml of tomcat/config xml file.

myApp is application folder and we want to deploy this c:\myApp with different context name

tomcat/config/context.xml

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="c:\myApp" path="/newContext" privileged="true">
</Context>

http://localhost:8080/newContext

Bookmark  

 

Leave a Reply

Security Code:

 

  Random Post