My index.jsp is
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>HOME</title>
</head>
<body>
Hi you are in index.jsp page
<s:action name="error" executeResult="true"></s:action>
</body>
</html>
my error action class is
public class error extends ActionSupport {
public String execute() throws Exception {
System.out.println("in error action.........");
return SUCCESS;
}
}
my struts.xml
<action name="error" class="action.error">
<result name="success" type="redirect">
<param name="location">/Login.jsp</param>
</result>
</action>
i want to redirect to Login.jsp when i hit the index.jsp page. but every time i hit index.jsp i come back to my index.jsp page but this time it is blank. it is going to action as it is printing "in error action.........". But it is not redirecting to Login.jsp
what am i doing wrong?