I have an application deployed in JBOSS and it is accessed as: localhost/appname When i enter only the IP address i get redirected to the JBOSS default page. Is there a way to go to the application's homepage with no need to give /appname ?
I hope the question is clear. Thanks in advance.
I am using eap6. This is my first time to use jboss. I don't see that I have $JBOSS_HOME/server. I see $JBOSS_HOME/domain/server. I have searched all the files under $JBOSS_HOME. I cannot find any WEB-INF and jboss-web.xml
A part of the solution given by Nightsorrow, you can also define the context root of your web application using the context-root tag of the WEB-INF/jboss-web.xml file. So defining it as '/', you can keep your original file name. This way you override the default behaviour of JBoss, which is defining the context root of web apps as the file name of the application (unless the app name is ROOT.war, which its default context is '/').
So the jboss-web.xml file would look like something similar to:
Notice that there can't be two applications with the same context root, so first you will have to remove ROOT.war, or change its context root following the same procedure:
<context-root>/oldRoot</context-root>
, which would make the old ROOT.war application available through localhost/oldRoot),orIn case you want to deploy an EAR file with a web module (war) inside (instead of just a plain war file), you've to use the META-INF/application.xml of the EAR. Defining the web module this way:
You have to deploy your application in file named "ROOT.war". Also you have to delete existing ROOT.war in deploy directory.