Tuesday 27 December 2011

Struts 2 Form Tags

Dear All,

Please download the attached file and carry out the following steps :-

1] Copy PreRegisterAction.java and RegisterAction.java into the com.sapient.actions package of the StrutsWeb project.
2] Copy City.java into the com.sapient.model package of the StrutsWeb project.
3] Copy registration_form.jsp and registration_success.jsp into the WEB-INF/pages folder of the StrutsWeb project.

4] Add the entry for the following actions in the struts.xml

        <action name="pre_register" class="com.sapient.actions.PreRegisterAction">
            <result name="reg_form">/WEB-INF/pages/registration_form.jsp</result>
        </action>
       
        <action name="register" class="com.sapient.actions.RegisterAction">
            <result name="reg_result">/WEB-INF/pages/registration_success.jsp</result>
        </action>

Thanks and Regards,
Vivek Mehta

No comments:

Post a Comment