I was looking for customizing the web application which i need to download from SVN and customise it using eclipse ,straight forward way is to copy the app to TOMCAT_DIR\webapps and than open it using the eclipse and set the build path out to the classes folder of webapp but that will be outside my SVN folder/Eclipse work space which is separate space for source code and it is backed up on daily basis to keep the source code safe.
Following are the steps to configure tomcat for webapp deployment to different location than TOMCAT_DIR\webapps location.
1- Create an xml with the webapp name in TOMCAT_DIR\conf\catalina\webappname.xml
XML file looks like this
For Windows
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="C:\MyPrivateSVN\EclipseWorkSpace\webappname">
</Context>
For Linux
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="/export/home/MyPrivateSVN/EclipseWorkSpace/webappname">
</Context>
Note- This directory should have execute permission for user whish is being used to run TOMCAT .
Happy coding.
Comments (0)
Post a Comment