JBoss 7:如何更改 WAR 上下文根
我有一个要部署在 WAR 文件 (app.war) 中的应用程序。部署后可以从 http://:8080/应用程序 我希望将其提供为类似的东西 http://:8080/secret/app
我搜索了文档,对于 JBoss'es 5 和 6,这似乎可以使用 jboss-web.xml 文件来完成。我已经尝试过,但没有运气。看来 JBoss 7 只是忽略了 jboss-web.xml 中的元素。
我不知道这是否相关,但该应用程序同时具有 JSF 和 PrettyFaces。
有谁知道 JBoss 7 是否可以实现这种行为?如果可以的话,该怎么办呢?我仍在努力寻找这个问题的答案。
谢谢。
I have an application that is to be deployed in a WAR file (app.war). After deployment it is available from
http://:8080/app
I would like to have it being made available as something like
http://:8080/secret/app
I searched the documentation and for JBoss'es 5 and 6 this seems to be able to do with a jboss-web.xml file. I have tried it but with no luck. It seems that JBoss 7 just ignores the element inside jboss-web.xml.
I don't know if this is relevant but this application has both JSF and PrettyFaces.
Does anyone know if this behavior is possible with JBoss 7? If so, how can it be done? I am still trying to find an answer for this.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这适用于 AS 7.0.1,WEB-INF/jboss-web.xml
我认为不可能有像“server/something/app”这样的应用程序根目录,但是您可以通过应用程序结构模拟这种行为
this works in AS 7.0.1, WEB-INF/jboss-web.xml
I don't think it is possible to have app root like "server/something/app", but you can simulate this behavior through application structure
只是为了分享个人经验...如果 jboss-web.xml 中的上下文根似乎被忽略...尝试查看它是否已在 application.xml 中声明(上下文根)
Just for sharing a personal experience...if the context-root in jboss-web.xml seems to be ignored...try to see if it is (the context root) already declared in your application.xml