如何在jboss7中配置静态上下文路径? [英] How do I configure a static context path in jboss7?
问题描述
我试图找到一种方法来配置jboss7中的静态上下文路径.我们正在从jboss4.2升级,在该版本中,server.xml中有一个配置元素,如下所示:
I am trying to find a way to configure a static context path i jboss7. We are upgrading from jboss4.2 and in that version we had a config element in server.xml that looked like this:
<Host name="localhost"
autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
>
<Context path="/directory/pdf"
docBase="/tmp/pdfdok"
reloadable="true">
</Context>
它在目录deploy \ jboss-web.deployer中.
It was in the directory deploy\jboss-web.deployer.
这样做的目的是能够使用如下URL到达目录/tmp/pdfdok: http: //或更准确地说是使用以下网址到达此目录上生成的pdf文档: http://server:port/directory/pdf/pdfdoc.pdf 从客户端弹出窗口.
The intention of this is to be able to reach the directory /tmp/pdfdok with a url like this: http://server:port/directory/pdf or more exactly to reach a generated pdf document on this directory with the url: http://server:port/directory/pdf/pdfdoc.pdf from a client popup window.
这里有人可以帮助我吗?
Is there someone here who can help me?
谢谢
Rune
推荐答案
在jboss7中似乎无法做到这一点.我改用fileservlet解决了我的问题.这是一个很好的示例页面: http://balusc.blogspot.com /2007/07/fileservlet.html
It seems like this is impossible to do in jboss7. I solved my problem by using a fileservlet instead. This is a good page to look at for an example: http://balusc.blogspot.com/2007/07/fileservlet.html
这篇关于如何在jboss7中配置静态上下文路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!