Struts 2 Redirect Action tutorial


            Action can be simply forwarded to one page to another view page without using Controller, take a look at this simple example.

Remove the action tag and user result name as success to redirect to view page without using controller

Code

<struts>
	<package name="default" extends="struts-default">		
		<action name="view" >
			<result name="success">/view.jsp</result>
		</action>
	</package>
</struts>


Screenshot

            

            

Download

            Struts 2 page redirect example war

            Struts 2 page redirect example maven zip



Related Post

Comments


©candidjava.com