0

I have an EAR file and its application.xml is something like

<web-uri>pharma.war</web-uri>
<context-root>pharma</context-root>

When I start the application, I use below URL:

http://localhost:8080/pharma/Login

Login is a servlet defined in WEB-INF of war file. In the servlet, I am saying it to redirect to app/launchPage.html. It is supposed to redirect to

http://localhost:8080/pharma/app/launchPage.html but it is redirecting to

http://localhost:8080/app/launchPage.html.

Same thing is working in JBoss EAP 4.2. I am trying to migrate to JBoss EAP 6.3.0. I think, I missed some configuration but not sure what configuration.

ServletRootPath="/Login"
redirectPagePath="app/launchPage.html"

Java Code: ctx.getResponse().sendRedirect(redirectPagePath);
ctx.getResponse() returns an object of type HttpServletResponse

Can you please let me know, what I am missing here

Swaraj Shekhar
  • 187
  • 1
  • 7
  • 28
  • 1
    you are missing `request.getContextPath` in redirect http://stackoverflow.com/questions/19724565/is-using-request-getcontextpath-in-scriptlet-for-jsp-is-a-good-practise – user1516873 Apr 21 '15 at 11:56
  • Since I am passing a relative path, should it not prepend the contextpath on its own? – Swaraj Shekhar Apr 21 '15 at 12:29

0 Answers0