check this... this will work.

#file name bajji.jsp

<HTML>
<BODY>
<form action="bajji.jsp">
<input type="text" name="sname" value="">
<input type = "submit" name = "send">
</form>

<%! int count = 0; %>

  <%    if(count == 0)
        {count++;}
        else
        {
        String s = request.getParameter("sname");
        if (s.equals("silk")) {
  %>
     <jsp:forward page="Failure.html" />
     <% }} %>
</BODY>
</HTML>


> -----Original Message-----
> From: S Ramakrishnan [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 19, 2001 10:53 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Exception with jsp:forward
>
> I tried the same template with
>
>       Cotton Kamala
>       Rayon Revathi
>       Nylex Nalini
>       Polyester Parimala
>       Shiffon Shiela
>       Rexin Radha
> &   Khadder Kala
>
> It yields the same error.
> What could be wrong?
>
> Rk
> x77309
>
> ----- Original Message -----
> From: "Venkat" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 18, 2001 7:32 PM
> Subject: Re: Exception with jsp:forward
>
>
> > perhaps your server is not aware of the popularity of bajjis, silk and
> > silksmitha, hence is rejecting your forward directive -;)
> >
> > try some other names
> >
> > cheers
> >
> > .venkat (Venkata Ratnam Vadlamannati)
> > Daiichi Media Pte. Ltd
> > 21, Kim Keat Road
> > Singapore - 328805
> >
> > Tel: +65 849 8666 Extn.405
> >        +65 9439 0394
> > Fax: +65 256 5922
> > URLs: http://www.daiichimedia.com
> >            http://www.moreatonce.com
> > ----- Original Message -----
> > From: "S Ramakrishnan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, January 19, 2001 9:53 AM
> > Subject: Exception with jsp:forward
> >
> >
> > > Hi -
> > >
> > >
> > > I have a page that posts a form and based on the
> > > input forwards to a different page:
> > >
> > >   # bajji.jsp
> > >   <form action="bajji.jsp>
> > >   <input type="text" name="sname" value="">
> > >   </form>
> > >
> > >   <% String s = request.getParameter("sname");
> > >     if (s.equals("silk")) {
> > >    %>
> > >      <jsp:forward page="silksmitha.jsp" />
> > >    <% } %>
> > >
> > >
> > > Hence if the input is "silk" the request is forwarded to
> silksmitha.jsp.
> > > The jsp:forward directive issues an exception that
> > >
> > > java.io.IOException: Error: Attempt to clear a buffer that's already
> been
> > > flushed
> > >
> > >
> > > Is this because the output has been already partially written to
> > > before the jsp:forward?
> > >
> > > Thanks,
> > >
> > > Rk
>
> ---
> S Ramakrishnan, Cisco Systems Inc., San Jose, Ca
>
> ==========================================================================
> =
> 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

===========================================================================
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