Share a folder in tomcat

一世执手 提交于 2019-12-11 01:34:45

问题


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 trying - So when I navigate to http://localhost:8080/myfiles I expect to see the contents of c:\temp

Thanks


回答1:


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



来源:https://stackoverflow.com/questions/4133568/share-a-folder-in-tomcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!