Oftentimes when I see an index.jsp on a web application it just forwards to another url like login.jsp such as
<jsp:forward page="login.jsp" />
When using struts2, I want a similar index.jsp but I want it to forward to an action. How do I do this?
You can use plain HTML if you want
Between your head tags use:
This will redirect to myCOntext/Login.action
If Login is behind a name space you wil need to include that in the URL
Scriplet:
I use it with Struts2 and it works.
Try this:
This is also a working one,
But in my experience it will work only when it is in index page, or any other page which is loaded as first page.
If I put response.sendRedirect in any successor page it will not work Reffer this question