如何在root(/)上下文中将war文件部署到Wildfly ver 9.0.1 [英] How to deploy war file in root(/) context to Wildfly ver 9.0.1
问题描述
我是Wildfly的新手,直到现在我正在使用tomcat部署我的应用程序。现在只是为了增加Wildfly的功能,我们要继续前进。
我使用Windows Os,我已经完成了wildfly的基本实现来启动服务等,但是无法部署ROOT.war代替Welcome页面。我已经学习了很多链接,我在我的项目WEB-INF文件夹中添加了jboss-web.xml,具有以下设置,因为我有链接。
但是我仍然无法在独立部署中部署ROOT.war。每次都失败了。没有得到我做错了。
`<?xml version =1.0encoding =UTF-8? >
< jboss-web xmlns =http://www.jboss.com/xml/ns/javaee
xmlns:xsi =http://www.w3.org/2001/XMLSchema -instance
xsi:schemaLocation =
http://www.jboss.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss -web_5_1.xsd>
< context-root> /< / context-root>
< / jboss-web>`
我已经成为管理员用户,但是部署我只使用wildfly用户设置。因为它也从bin / init.d wildfly.conf中取消注释字段。
但完全不知道错误。
注意:我们也在linux机器上尝试过,但是ROOT.war没有被部署也有。使用
两个文件必须在WEB-INF文件夹中添加制作战争文件
1. jboss-web.xml
<?xml version =1.0encoding = UTF-8\" >?;
< jboss-web xmlns =http://www.jboss.com/xml/ns/javaee
xmlns:xsi =http://www.w3.org/2001/XMLSchema -instance
xsi:schemaLocation =
http://www.jboss.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss -web_5_1.xsd>
< context-root> /< / context-root>
< / jboss-web>
- 空bean.xml
I am newbie for Wildfly till now I was working on tomcat to deploy my applications. Now just for add on features of Wildfly we want to move on to this. I am using Windows Os, I have done with the basic implementation of wildfly to start service etc. but Unable to deploy the ROOT.war in place of Welcome page. I have studied and gone through lot of links, I added jboss-web.xml in my project WEB-INF folder with following settings as I got in links. But I am still unable to deploy the ROOT.war in standalone deployment. Each times it goes to failed. Not getting what I have done Wrong.
`<?xml version="1.0" encoding="UTF-8"?> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd"> <context-root>/</context-root> </jboss-web>`
I have made the admin user, But for deploying I am using wildfly user setting only. For it also I uncommented the fields from bin/init.d wildfly.conf fly. But totally unaware of the error.
Note: We also tried it on linux machine but ROOT.war is not getting deployed there too.used
解决方案two files have to be added in WEB-INF folder before making war file 1. jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd"> <context-root>/</context-root> </jboss-web>
- empty bean.xml
这篇关于如何在root(/)上下文中将war文件部署到Wildfly ver 9.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!