when i implement forward it shows the error in server
when i implement forward it shows the error in server.
with out forward it work fine but when i implemented the forward to another it shows errors in server.
SEVERE: Parse Error at line 122 column 23: The content of element type "action-mappings" must match
"(action)*".
org.xml.sax.SAXParseException: The content of element type "action-mappings" must match "(action)*".
this is my struts file:
import org.apache.struts.action.*;
import javax.servlet.http.*;
public class NewStruts extends Action{
public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){
ActionForward af=null;
System.out.println("action form displayed");
af=mapping.findForward("hello");
return af;
}
}
this is my action-mappings tab in struts-config.xml:
<action-mappings>
<!-- Default "Welcome" action -->
<!-- Forwards to Welcome.jsp -->
<action
path="/Welcome"
forward="/pages/Welcome.jsp"/>
<!-- sample input and input submit actions
<action
path="/Input"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/Input.jsp"/>
<action
path="/InputSubmit"
type="app.InputAction"
name="inputForm"
scope="request"
validate="true"
input="/pages/Input.jsp"/>
<action
path="/edit*"
type="app.Edit{1}Action"
name="inputForm"
scope="request"
validate="true"
input="/pages/Edit{1}.jsp"/>
end samples -->
<action type="NewStruts" path="/one"/>
<forward name="hello" path="/index.jsp"/>
</action-mappings>
i hope any one can help me