开发者

Share a folder in tomcat

开发者 https://www.devze.com 2023-01-23 23:55 出处:网络
How can I enable a folder to be accessable using a browser with tomcat 6 ? I think I need to add a context to web.xml ?

How can I enable a folder to be accessable using a browser with tomcat 6 ?

I think I need to add a context to web.xml ?

I'm 开发者_JS百科trying - So when I navigate to http://localhost:8080/myfiles I expect to see the contents of c:\temp

Thanks


You need META-INF/context.xml, and there in the <Context> element set docBase to point to the desired directory.

See here the attributes to set in the Context element

0

精彩评论

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

关注公众号