Biju,

You have to keep in mind that a JSP is a Servlet, and, like all servlets, is
run entirely on the server.  Only after all processing is complete is any
data returned to a user's browser.

Currently, here's what probably happening to your page....

The JSP is writing to the output buffer the HTML text representing your text
boxes and submit button.  It then forward to the servlet in your forward
request.
The specs for the forward request require that no output actually be sent as
part
of the response (otherwise, the forward will generate an error).  In this
case,
since the output is buffered, the buffer is being cleared, and new output,
corresponding to whatever your servlet does, is displayed.

I assume that your goal is to always present the text boxes and submit
button
followed by the output of the servlet, whatever it may be.  In this case,
you
probably need to use the jsp:include tag, which concatenates the output of
the
included files into whatever output you have already generated.

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Biju Nambisan
> Sent: Thursday, February 10, 2000 11:38 PM
> To: [EMAIL PROTECTED]
> Subject: Help Required
>
>
> Greetings list,
>
> I have written a JSP page which has some HTML code(Two Text Boxes and A
> submit button) ..After this I have a <jsp:forward
> page="/servlet/myservlet" />
> My requirement is
> First it should display the text boxes and Submit button which when
> submitted with input parameters should be taken by the servlet and do
> some processing .Now when I load the JSP it is directly displaying the
> output of the servlet without displaying the text boxes and submit
> button..
> I am not looking for a post action method implementation which is  known
> to me
>
> Can somebody in the list help me out finding a solution to this...
> An early response is Solicited..
> TIA..
>
>
> Regards,
> Biju
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to