Jboss deployment in root context

Yes, I know about enable-welcome-root=false , but I can not find it in the files. Use wildfly final or jboss eap 6.2. Where is it? And why do I need to add jboss-web.xml to WEB-INF?

+6
source share
3 answers

This file is standalone.xml and is located in the following directory:

 %JBOSS_HOME%/configuration/standalone.xml 

You need to add enable-welcome-root=false to the definition of your virtual server offline:

 <virtual-server name="localhost" enable-welcome-root="false"> 

And create a jboss-web.xml file with the following:

 <?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>/</context-root> </jboss-web> 
+14
source

And based on the answer provided by BelgianMyWaffle.

While J2EE defines the runtime of a Java application, it does not specify the order in which application servers are configured, so each of them has its own way of setting behavior.

Jboss-web.xml is described below:

jboss-web.xml is an XML file containing the specific behavior of Japps Webapp for JBossWeb. It replaces the Tomcat context.xml file. You need to use it only if you want the properties and behavior to be displayed within the web.xml Servlet 3.0 specifications.

Listed below are all the different mechanisms supported by wildfly to configure application deployment

JBoss Web Deployment Descriptor. This can be used to override settings from web.xml and to set special WildFly options.

+5
source

Solution: Clean up the wildfly server, a new clean project, just add jboss-web.xml to WEB-INF. Normal deployment and everything works fine.

+5
source

All Articles