-
1. Re: Howto change default-web-module in Wildfly
ctomc Feb 26, 2014 4:41 PM (in response to gkokaia)What exactly do you mean?
to have your war instead of ROOT.war? as default web module that binds to / ?
just change
<host name="default-host" alias="localhost">
to
<host name="default-host" alias="localhost" default-web-module="name-of-your.war">
--
tomaz
-
2. Re: Howto change default-web-module in Wildfly
gkokaia Feb 27, 2014 2:54 AM (in response to ctomc)It`s for Jboss 7.1, don`t work for Wildfly
-
3. Re: Howto change default-web-module in Wildfly
ctomc Feb 27, 2014 4:50 AM (in response to gkokaia)???
You mean you want this for 7.1 or for WildFly?
sniplet i showed you is for undertow subsystem that is part of WildFly.
What exactly do you want to do?
-
4. Re: Howto change default-web-module in Wildfly
gkokaia Feb 27, 2014 10:28 AM (in response to ctomc)I want it for WildFly.
You exlample work when war file is independed, but won`t work when it inside ear project. I thin it`s bug. In 7.1 work perfectly.
-
5. Re: Howto change default-web-module in Wildfly
ctomc Feb 28, 2014 9:56 AM (in response to gkokaia)Can you add some context what exactly you want to do?
if you deploy EAR you don't need that setting at all, all you need to do is to map war to / in application.xml
-
6. Re: Howto change default-web-module in Wildfly
horvie Apr 23, 2014 8:47 AM (in response to ctomc)Hi, I will hijack this thread as it is exactly what I need...
I have multiple EARs deployed and I would like to "redirect" to context specified in a war inside one of them.
I would like to avoid mapping to '/'.
-
7. Re: Howto change default-web-module in Wildfly
ctomc Apr 23, 2014 9:08 AM (in response to horvie)Can you give bit more of a context, what exactly do you want to do and how does your application structure look now.
-
8. Re: Howto change default-web-module in Wildfly
kharonte_iot Apr 23, 2014 10:34 AM (in response to ctomc)Try this:
<host name="default-host" alias="localhost">
<!--location name="/" handler="welcome-content"/-->
<location name="/" handler="deployments/ear-name/name-of-your.war"/>
-
9. Re: Howto change default-web-module in Wildfly
jaikiran Apr 23, 2014 11:18 AM (in response to kharonte_iot)Kharonte IoT wrote:
Try this:
<host name="default-host" alias="localhost">
<!--location name="/" handler="welcome-content"/-->
<location name="/" handler="deployments/ear-name/name-of-your.war"/>
I don't know whether that's going to work or not (haven't checked the code). But even if it did, that's not the right way for various reasons, one of them being that not all deployments are done via the deployments/ folder. The CLI, admin console, management API allow applications to be deployed without them being placed in the deployments/ folder.
Edited by Jaikiran - Fixed typo.
-
10. Re: Howto change default-web-module in Wildfly
ctomc Apr 23, 2014 11:15 AM (in response to jaikiran)I do know the code very well and I can assure you that this will not work.
-
11. Re: Howto change default-web-module in Wildfly
horvie Apr 23, 2014 11:29 AM (in response to ctomc)My situation is as follows. I have an EAR package (let's call it) someear.ear that contains a.jar, b.jar, c.war. When I deploy it, the webapp is mapped to /c. So it is accessed by http://localhost/c. What I need is that when I go to http://localhost/ I am sent to http://localhost/c. I am avare that "in the old days" we managed that with meta refresh on welcome content's index.html; but I am wondering if ther is a more sophisticated way.
-
12. Re: Howto change default-web-module in Wildfly
ctomc Apr 23, 2014 11:36 AM (in response to horvie)That is simple
just modify your application.xml to have <context-root>/<context-root> for your web-module.
-
13. Re: Howto change default-web-module in Wildfly
horvie Apr 23, 2014 1:28 PM (in response to ctomc)Here's the thing. I deploy different combinations of multiple apps on many servers. On some I want one app to be "default" on some I want another. If I do it in application.xml, I would have to have multiple releases of same app - what I'm trying to avoid.