分享在Tomcat中的文件夹 [英] Share a folder in tomcat

查看:123
本文介绍了分享在Tomcat中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能使一个文件夹使用浏览器和Tomcat 6是accessable?

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

我想我需要添加上下文到web.xml?

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

我想 -
所以,当我浏览到的http://本地主机:8080 / myfiles的我希望看到C的内容:\\ TEMP

I'm trying - So when I navigate to http://localhost:8080/myfiles I expect to see the contents of c:\temp

感谢

推荐答案

您需要 META-INF / context.xml中,并且有在 <语境方式> 元素中设置的docBase 来指向所需的目录

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

看到这里的属性在<$来设置C $ C>上下文元素

这篇关于分享在Tomcat中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆