Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
please try to give me satisfactory explanation
<action path="/listforums"
            type="com.mvnforum.actions.ListForumsAction">

<forward name="success"
	         path="/mvnplugin/mvnforum/user/listforums.jsp"
	         redirect="false"/>

</action>


Hi all,
Please go through the code above. I have couple of very technical questions in my mind,

(1) in the URI when "http://......../app_name/listforums.do" request comes, the container will execute the "type" attribute in action tag. i.e. ListForumsAction.java file. Now, when we return mapping.findForward("success"), it will find the logical name "success" in that action tag and forwards the page to the specified path. HERE COMES MY DOUBT. When container see "success" it will display the content of listfurms.jsp page. But what would be the URI at that time on the address bar ???? will it be the same as "http://......../app_name/listforums.do" or "http://......../app_name/mvnplugin/mvnforum/user/listforums.jsp" ??

(2) what if we've made redirect="true"

[edit by benjymous - added pre tags and escaped your html so we can see your code snippets]
Posted
Updated 20-Oct-10 11:09am
v5

1 solution

(1)
The URI in the address should be the redirected address, that is the page being shown.

(2)
If you specify redirect="true", Struts uses a client-side redirect [response.sendRedirect()]. The JSP will be invoked by a new browser request, and any data stored in the old request will be lost.
 
Share this answer
 
Comments
Dalek Dave 3-Nov-10 6:22am    
Good Call.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900