I want to deploy my application in someother location rather than webapps directory in Tomcat.
I installed Apache Tomcat 4.1.31 (C:/tomcat4.1.31) and Apache web server 2.0.46 (C:/apache2046). I keep my projects at projects (E:/Projects) directory. I have both PHP and Java projects. I have configured PHP projects to run straightway by creating Virtual hosts at Apache web server. They are all working fine. Now, i have placed my new java project, PortalJobs at E:/Projects/PortalJobs. I also created a project, PortalJobs in Eclipse for E:/Projects/PortalJobs and the workspace is also the same location of the project. Now, What i do is I compile the class files and place them at webapps/PortalJobs/WEB-INF/classes/com/PortalJobs/core/ to run my JSP files. It works perfectly.
Now, i am tired of copying files from my project directory to Webapps directory each time after compilation and also making changes in JSP files for testing my application. Is there any way to keep my files at E:/Project/PortalJobs and run them strightway without moving files to WebApps like Virtual Host in Apache? i.e Deploying an application in different directory rather than the traditional one, WEBAPPS.
I am totally newbie in Tomcat and could anyone guide step by step. I am in a beginner level when it comes to Tomcat. But, For Apache, i am in intermediate level.
You'll want to modify either the Host tag or the Context tag within your conf/server.xml. For example the default looks something like:
If you want the entire host to go to a different directory then change the appBase in the Host section. If you want only a particular URL to go somewhere else change the context to something like:
That way any accesses that include /someURL will be directed to a different web app. Note that if the docBase path does not start with a root path name (like / on Unix or C: on Windows) the context is relative to the appBase of the enclosing Host.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.