【发布时间】:2016-04-07 18:59:33
【问题描述】:
这是我第一次提问,
我的 jboss 配置有点问题。
我正在使用 jboss 6.2
已经读过这篇文章
- http[:]//www.mastertheboss.com/jboss-web/jbosswebserver/how-to-deploy-a-web-application-on-the-root-context-on-jboss-as-7李>
- https[:]//developer.jboss[dot]org/wiki/HowdoIoverridethewebcontextroot
- https[:]//stackoverflow[dot]com/questions/21957060/jboss-deploying-in-root-context
我做了什么?
- 创建 jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>/</context-root> </jboss-web>
- 在我的standalone/configuration/standalone.xml 中将 enable-welcome-content 设置为 false
<virtual-server name="default-host" enable-welcome-root="false">
- 将 myapp.war 更改为 ROOT.war 并部署到 Standalone/deployments/
- 将我的欢迎文件列表设置为 login.xhtml
<welcome-file-list> <welcome-file>login.xhtml</welcome-file> </welcome-file-list>
问题来了
当请求根本身时 192.168.1.98 welcome-content
当我请求 192.168.1.86/login.xhtml
我想要的是当我只请求 IP 地址时,它链接到 login.xhtml。 现在,我必须请求我的 ip + login.xhtml (192.168.1.86/login.xhtml)
那我该怎么办?
需要你们的帮助。
欢迎提出任何想法。
谢谢。
【问题讨论】: