问题
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