1

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

2
  • 2
    stackoverflow.com/questions/2404528/…
    – user425367
    Aug 24, 2011 at 11:32
  • Note: Windows file paths (such as C:\testFolder) use backslashes \. Pretty much everything else (including URLs) use slashes /. So it should be http://localhost:8080/myFolder. Aug 24, 2011 at 11:43

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.