struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prashid <>
Subject Re: struts2 disable validation on page load
Date Sun, 07 Oct 2012 13:39:29 GMT
Thanks. Everything is fine except url problem,

I have added as you have instructed me. *Only problem is URL. I still get
/processAdd in the url which should be /add after action recdirection as

 <s:form action="processAdd" method="POST">
<s:submit method="execute" value="#title"/>

  public String execute() throws Exception {
        System.out.println("execute() executed");
        //Process form data
        return SUCCESS;

    public String input() throws Exception {
        System.out.println("input() executed");
        //Prepare form data
        return INPUT;

 <default-action-ref name="list"/>
        <action name="list" class="com.myapp.actions.StudentAction"
            <result name="success" type="tiles">/student.list.tiles</result>

        <action name="add" class="com.myapp.actions.StudentAction"
            <result name="input" type="tiles">/student.edit.tiles</result>
            <result name="failure" type="tiles">/student.edit.tiles</result>

        <action name="processAdd" class="com.myapp.actions.StudentAction">
            <result name="success" type="redirectAction">list</result>
            <result name="input" type="tiles">/student.edit.tiles</result>
            <result name="failure" type="redirectAction">add</result>

View this message in context:
Sent from the Struts - User mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message