technical doubt in struts-config.xml

Hi all,
please try to give me satisfactory explaination ....




<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" attribut 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"  
jayz_smithAsked:
Who is Participating?
 
boonlengCommented:
set redirect="false" will see "http://......../app_name/listforums.do" coz is using RequestDispatcher.forward().

set redirect="true" will see "http://......../app_name/mvnplugin/mvnforum/user/listforums.jsp" coz is using HttpServletResponse.sendRedirect()
0
 
Gurvinder Pal SinghCommented:
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.

check this link
http://struts.apache.org/1.x/userGuide/building_controller.html

1) redirect="true" means that you are choosing response redirect over response forward, so you will see http://......../app_name/mvnplugin/mvnforum/user/listforums.jsp



0
 
jayz_smithAuthor Commented:
perfect answer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.