"Singh, Jasbinder" wrote:
>
> Hi All,
>
> >From a jsp I invoke a servlet from which I call another jsp.
>
> 1.jsp----------> servlet -----------> 2.jsp
>
> In 2.jsp I include a html.
> The html in 2.jsp gets included if I invoke the servlet using GET method.
> i.e., 1.jsp-----GET--->servlet---->2.jsp    works fine.
>
> But when I use POST method the html file is not getting included in 2.jsp.
> i.e., 1.jsp---POST--->servlet---->2.jsp doesn't work well.
>
> Does anyone has a solution to this ? I need to use the POST method.

I consider it a bug in the web container you use if it can't handle
the POST scenario, but a work-around is to use the include *directive*
(<%@ include file="theFile.html" %>) instead of the include *action*
(<jsp:include page="theFile.html" flush="true" />). Be aware, though,
that when you use the directive, changes you make to the included
file may not be visible until you also modify the including JSP file
(or manually remove the class file representing the JSP page).

You can read more about the different include options in an article I
wrote for the O'Reilly web site:

  <http://java.oreilly.com/news/jsptips_1100.html>

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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