technical doubt in struts-config.xml

Posted on 2010-01-05
Last Modified: 2013-11-24
Hi all,
please try to give me satisfactory explaination ....

<action path="/listforums"

<forward name="success"


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/" request comes, the container will execute the "type" attribut in action tag. i.e. 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/" or "http://......../app_name/mvnplugin/mvnforum/user/listforums.jsp"  ??  

(2) what if we've made redirect="true"  
Question by:jayz_smith
    LVL 14

    Accepted Solution

    set redirect="false" will see "http://......../app_name/" coz is using RequestDispatcher.forward().

    set redirect="true" will see "http://......../app_name/mvnplugin/mvnforum/user/listforums.jsp" coz is using HttpServletResponse.sendRedirect()
    LVL 40

    Assisted Solution

    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

    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


    Author Closing Comment

    perfect answer

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    string initialization in java 11 94
    java update needs to be set up as msi 1 38
    no14 challenge 14 46
    allStar challenge 1 27
    I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now