Hi,

I have a question as to how to combine multiple JSPs in model 2.
This is rather typical situation: input form (JSP 1) at the top of the page,
while JSP 2 containing resulting data (table, etc) is at the bottom of the
page. This JSP 2 is handed over the data by Command/Action class.

In generic terms, JSP 1 has near the end the following statement:
<jsp:include page="JSP2.jsp" flush="true"/>

My servlet has:
RequestDispatcher rd = sc.getRequestDispatcher (url);
rd.forward (req, res);

JSP 2 is rather typical:
  ArrayList myAttrList = (ArrayList) request.getAttribute("myAttr");
...

The key is the parameter in the following servlet line:
RequestDispatcher rd = sc.getRequestDispatcher (url);

When url = URL of JSP2, I get the resulting table which is part of JSP 2 but
not the JSP 1 containing input form with data as I wanted.
However when URL is URL is JSP1 (original input form which also has
"jsp:include" of JSP2), it works as I want.
However, somehow this whole construction it does not feel right to me. Is
there any alternative  or better approach? Does such an approach generates
servlet chaining?.

Thanks,

Vadim Shun
NEW Corp
Dulles, VA

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to