Announcement Announcement Module
Collapse
No announcement yet.
Jsp page has include Jsp tag Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jsp page has include Jsp tag

    Hi,

    I have a Jsp page index.jsp as follows

    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="spring" uri="/spring" %>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Untitled Document</title>
    </head>


    <%@include file="topnav.jsp"%>
    <%@include file="overview.jsp"%>

    <body>
    </body>
    </html>

    If you notice there are 2 include jsps as above.

    This is what i want to accomplish :---
    I execute the onSubmit method in my controller. At the end of onSubmit, I want to show index.jsp so I return
    new ModelAndView("index","index", index);

    So, above call does go to index.jsp correctly. But at this point I am stuck.
    In above call there is a index object (third parameter), which is a List. and the real implementation of this object is happening in topnav.jsp (included Jsp) and NOT in index.jsp.

    My question: How do I send this List to topnav.jsp (included Jsp) and loopover the list, even though my new ModelAndView is sending the control to parent Jsp (That is index.jsp) ??

    Pl help me.

    thanks,
    pp

  • #2
    I have situations like this and whatever model data my controllers send to the including pages is available in the included ones already
    but I am using the JSTL import tag

    <c:import url="included.jsp"/>

    Comment

    Working...
    X