0 Replies Latest reply: Jul 25, 2014 1:04 AM by 2720329 RSS

    Struts2, i need to include a jsp into another, and both necessitate of different Actions



      I've a jsp that show a products list and into the same page i import another jsp for the header (considering that i need it in every page of the site, i've created it into another file for easyly import in each page).

      The main jsp (productList.jsp) need to be anticipated from an Action that generates the products list, while the header.jsp needs another Action for retrieve login informations about the user.


      In other words this are the settings:

      <action name="ShowCatalog" class="com.myCompany.showCat">
        <result name="SUCCESS">productList.jsp</result>


      into the productList.jsp page i've:

      <s:include value="header.jsp" />

      Into the header.jsp i need to retrieve user information server-side that i've managed into another class called userInfo.java

      How can i resolve this situation?