-
1. Re: AS7 and context-root
jaikiran Aug 20, 2011 1:53 AM (in response to jean.baldessar)In your standalone configuration file, set the enable-welcome-root to false (by default it's true) for the web subsystem and deploy your application at the root context. The enable-welcome-root controls whether or not to deploy JBoss' welcome-content application at root context.
<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host"> <connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/> <virtual-server name="default-host" enable-welcome-root="false">
-
2. Re: AS7 and context-root
jean.baldessar Aug 22, 2011 7:40 AM (in response to jaikiran)Thank you jaikiran pai, it works.
But what if I want to access the management application now?
How can I do that?
I tried to access localhost in the 9990 port but it doesn't work
-
3. Re: AS7 and context-root
dlofthouse Aug 22, 2011 7:49 AM (in response to jean.baldessar)1 of 1 people found this helpfulFor management just go straight to http://localhost:9990/console - the root context on 8080 was only a simple redirect to that URL.
-
4. Re: AS7 and context-root
ohmygod Jul 23, 2012 3:51 AM (in response to dlofthouse)How to redirect the root context to my project's context-root?
I used to code like this to do this in an index.jsp but I found under welcome-content folder there is only index.html. I tried to put the index.jsp into welcome-content folder with only below content but seems not working.
<% response.sendRedirect("/myproject/"); %>
How can this be done?
-
5. Re: AS7 and context-root
pugsherpa Aug 3, 2012 3:22 PM (in response to ohmygod)Mike Just - were you able to figure out how to do this? We need to do this too. In the past, we modified ROOT.war/index.html and put a redirect in there. How do you do it in the new Jboss 7?
-
6. Re: AS7 and context-root
ohmygod Aug 4, 2012 1:25 AM (in response to pugsherpa)I am also waiting for someone here to suggest. I am not able to get this done by myself
-
7. Re: AS7 and context-root
jaikiran Aug 6, 2012 3:18 AM (in response to pugsherpa)Why can't you just deploy your application as root application (at / context)?
-
8. Re: AS7 and context-root
ohmygod Aug 6, 2012 3:21 AM (in response to jaikiran)Could I ask how to do this..?
-
9. Re: AS7 and context-root
jaikiran Aug 6, 2012 3:47 AM (in response to ohmygod)mike just wrote:
Could I ask how to do this..?
See my first post in this very thread.
-
10. Re: AS7 and context-root
ohmygod Aug 6, 2012 6:07 AM (in response to jaikiran)Thanks, Jaikiran. I have turned "enable-welcome-root" to false but the problem is after that http://localhost:port is not accessible at all. My question is how to direct this address to my project's url like http://localhost:port/myproject.
-
11. Re: AS7 and context-root
pugsherpa Aug 6, 2012 8:43 AM (in response to jaikiran)@jaikiran - I wish you hadn't locked my other thread. The answer listed here won't work for our situation. We need to be able to do a redirect from root context to our app's context, we can't deploy our app to the root context. Isn't there a way to redirect the root context?
-
12. Re: AS7 and context-root
jaikiran Aug 6, 2012 9:33 AM (in response to pugsherpa)pugsherpa wrote:
@jaikiran - I wish you hadn't locked my other thread.
That's one of the reasons why we don't recommend asking the same question in multiple places. You asked the same question here as well as the other thread. If your issue isn't related to the question here (which is about setting the root context) then I'll reopen that other thread and you can continue the discussion there.
-
13. Re: AS7 and context-root
pugsherpa Aug 6, 2012 9:48 AM (in response to jaikiran)The reason I opened the other thread was because this thread marked the "Correct Answer" for an answer that doesn't work for what we are trying to do. I don't want to deploy our app at the root context, I want to redirect the root context to our app's context. I didn't expect any more discourse in this thread to find the answer to my question because the "Correct Answer" was already marked for this thread, but still doesn't answer my question. That's why I opened the other thread.
-
14. Re: AS7 and context-root
richardrobinson Oct 7, 2012 1:16 PM (in response to jaikiran)In the CLI this is possible:
/profile=default/subsystem=web/virtual-server=default-host:write-attribute(name=enable-welcome-root,value=false)
But what about in the Web Admin console --Is there any way to do this (disable welcome-context-root) in the Web Admin console?