Suresh,
Check the name of the pages that you are redirecting to.  Your browser
probably doesn't know what to do with a 'htnl' file.  I assume you meant to
type page1.html and page2.html.  Where are the files supposed to be
located?  Unless they are in the root directory of your webapp, they won't
be found.

Regards,

Richard

At 12:34 PM 12/30/2001 -0700, you wrote:
>Hi ,
>I'm new to servlets.
>I'm writing a small program using servlets.In that servlet I'll fetch
>results from the database.Based on the results I'll redirect a html page.
>  for that I used this code.
>    If(rs.next())
>    {
>    System.out.println("Before redirecting page1.html ");
>    res.sendRedirect("page1.htnl");
>    System.out.println("after redirecting page1.html ");
>     }
>    else
>    {
>      System.out.println("Before redirecting page2.html ");
>      res.sendRedirect("page2.htnl");
>      System.out.println("after redirecting page2.html ");
>     }
>I'm not getting any errors.
>But it's not redirecting to any page.but the out put statements are
>executing .
>What should i to to redirect to page.
>Thanks
>suresh
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to