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

  • Jsp page has include Jsp tag


    I have a Jsp page index.jsp as follows

    <%@ taglib prefix="c" uri="" %>
    <%@ taglib prefix="spring" uri="/spring" %>

    <html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Untitled Document</title>

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


    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.


  • #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"/>