I'm new to Tomcat web server. Up to now all my contexts have been deployed in the webapps directory (which is the default directory for deplyoing applications). This is tedious because my working directiory is within My Documents. So every time I finish some application I have to copy everything inside the webapps directory. I want to be able to use the My Documents as the default directory. To be more specific say I have an folder in My Documents named project1 (C:\My Documents\project1) where I have my .jsp-s and classes in their respective folders. Now I want to be able to run this application from Tomcat server i.e. http://localhost:8080/project1/some.jsp or http://localhost:8080/myproject1/some.jsp (where project1 and myproject1 are simply paths redirecting me to my application) I have searched the web but there seems to be no specific or clear answer for this. If you know, please be detailed and include also specific code I have to write in what file.
docBase specifies where the web application is to be found
Joined: Jul 14, 2006
Thank you very much Varsha,
I have Tomcat 5. In this version they discourage using the context tag inside server.xml. Instead they have a separate file called context.xml where the contexts should be put in. I tried to put it in there and it did not work. Once I put it in the server.xml it worked fine. I had to do one change to your suggestion. The "My Documents" folder is not found directly in the C:\ directory but under \Documents and Settings directory.
Thanks anyway, I appreciate it
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Using a different context directory than the default webapps in Tomcat 5