Ad

Tomcat: How To Link Http:\\localhost\myFolder To C:\testFolder

- 1 answer

I want to link a folder to custom url.

For example, I have a folder: C:\testFolder

I want this: when you type http:\\localhost:8080\myFolder tomcat actually shows testFolder.

Is that possible?

Thank you

Ad

Answer

Edit server.xml located under TOMCAT_HOME/conf

It contains tag like:

 <Host name="localhost"  appBase="webapps"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false">

change the value of appBase to C:/testFolder

Pay attention on the slash I used. Use forward slash although you are on Windows.

Ad
source: stackoverflow.com
Ad