Configuring Tomcat to NOT use webapps directory  
Author Message
rettigcd





PostPosted: 2003-12-19 8:02:00 Top

java-programmer, Configuring Tomcat to NOT use webapps directory currently my webapps directory is something like:

C:\java\netbeans3.5.1\tomcat406\webapps

This is where the Netbeans install put it. I want to move the
directory to something a little more convenient to work with like:

c:\webapps

All I can find in the Tomcat configuration file is:

<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">

but if I change appBase to anything like "c:\webapps" or "c:/webapps"
it doesn't work. Can anybody tell me how to move the appBase
directory outside of the Tomcat or Netbean directory?

Thanks in advance.
Dean
 
Eki Y. Baskoro





PostPosted: 2003-12-19 12:28:00 Top

java-programmer >> Configuring Tomcat to NOT use webapps directory G'Day Dean,

The tag should read:

<Host name="localhost" debug="0" appBase="c://webapps" unpackWARs="true">

Note the double forward slashes after the colon.


 
X_AWemner_X





PostPosted: 2003-12-29 21:10:00 Top

java-programmer >> Configuring Tomcat to NOT use webapps directory > C:\java\netbeans3.5.1\tomcat406\webapps
>
> This is where the Netbeans install put it. I want to move the
> directory to something a little more convenient to work with like:
>
> c:\webapps
>
> All I can find in the Tomcat configuration file is:
>
> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">

This works in my Tomcat4.x installation. I put this file, mywebapp.xml, to
"{tomcat}/webapps" folder and it will use given docBase. Url is still
http://localhost:8080/mywebapp address.

<Context path="/mywebapp"
docBase="c:/projects/mywebappfolder"
debug="0"
reloadable="true"
crossContext="false">

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="mywebapp_log." suffix=".txt"
timestamp="true"/>

</Context>