开发者

Tomcat: how to link http:\\localhost\myFolder to C:\testFolder

开发者 https://www.devze.com 2023-03-30 03:11 出处:网络
I want to link a folder to custom url. For example, I have a folder: C:\\testFolder I want this: w开发者_高级运维hen you type http:\\\\localhost:8080\\myFolder tomcat actually shows testFolder.

I want to link a folder to custom url.

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

I want this: w开发者_高级运维hen you type http:\\localhost:8080\myFolder tomcat actually shows testFolder.

Is that possible?

Thank you


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消