Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with context path needed!

Status
Not open for further replies.

bunnyweb

MIS
Jan 13, 2003
42
IE
I'm hoping and praying that this is possible.

I have a Windows 2000 server. I have Tomcat installed and running on the C drive. I want to be able to put my JSP pages on the D drive of the same machine.

I'm not all that familiar with Tomcat, but I found that I can add a context path in my server.xml file like so:

<Context path="/aib" docBase="aib" debug="0" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_aib_log." suffix=".txt" timestamp="true"/>
</Context>


However, I found that the path must be in relation to the Tomcat webapps directory. Is there a way to point this to a directory on the D drive instead?

Any help would be greatly appreciated. Thank you!
 
Yes. You must define (or change) a <Host> entry in server.xml like so :

Code:
<Host name="localhost" debug="0" appBase="D:/some/where"
      unpackWARs="true" autoDeploy="true"
      xmlValidation="false" xmlNamespaceAware="false">
 
      <Context path="/myWebapp" docBase="myWebApp" debug="0" reloadable="true" crossContext="true/>
</Host>

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top