1 2 3 Previous Next 31 Replies Latest reply on Oct 11, 2012 11:04 PM by ohmygod Go to original post
      • 30. Re: AS7 and context-root
        richardrobinson

        So, to recap, you opened a browser on the same box where AS7 resides -- on the localhost (127.0.0.1). a) when you type "http://localhost:port" the app does not get redirected. b) when you type "http://localhost:port/demo" and it works fine.

         

        Did you ensure ROOT.war was redeployed after you made the change to index.jsp that is within it. If not, you should remove ROOT.war and ROOT.war.deployed file from standalone/deployments and then redeploy ROOT.war. Double-check console or server.log to ensure it was deployed without error. Assuming deployed without error, try a) above again. If it does not work, I guess you could try the following:

         

        1. Did you add any configurtion to the standalone.bat/.sh or standalone.bat/.sh.conf file? If so consider what those changes are.
        2. How are you starting AS7? Are you adding anything on the command line?
        3. If neither of these result in anything, consider removing localhost from the equation. it's not entirely useful anyways. Add a /etc/hosts (assuming RHEL/Linux) entry to your ip address. Change the interface setting in standalone.xml to use 0.0.0.0. Reboot AS 7 and try URL a above again but using the new domain name

         

        If you're on Windows, consider installing fiddler and setting it up as a proxy between browser (IE?) and AS7. Then examine the request and responses after hitting http://yourdomain:port. You would see the response from the server and whether it was sending back a redirect...

        • 31. Re: AS7 and context-root
          ohmygod

          Hi Richard,

           

          Thanks so much for your overview, I found I did not add ROOT.war.dodeploy to make it deployed at all. After deploying ROOT.war successfully, the redirect works now.

           

          BTW, only a context name is ok in the index.jsp for the redirection.

           

          <% response.sendRedirect("/demo"); %>

           

          Really appriciated.

          1 2 3 Previous Next