Can anyone tell me how to forward or redirect page with Struts? I'm checking if the session is null or not in every jsp and want to redirect if null. I can do this with simple jsp:forward or response.sendRedirect() but i want to redirect to a struts2 action I declared in my struts.xml. I tried putting action names in above mentioned tag and method but it didn't work.
if(session.getAttribute("user")!=null)
response.sendRedirect("loginAction");
Is there anyway to do this.I can't call to a .jsp directly because I have add a security constraint to *.jsp url pattern in my web.xml. So i want to do this forward or redirect using actions. Any help?