Hello All,
I got problem while redirecting the URL to next servlet.
When I use sendRedirect from Servlet1:Port1 to Servlet2:Port2 if the
Servlet2 running at Port2 is down i'm getting  "Page not fond" in IE
and "No response from Server" in Netscape. I want to display my own page

if the Servlet2 is not running in the Port2.
Here is my code which i've written for sendRedirect. But i'm not getting
my
page if the Servlet2 is not running in Port2.
Kindly tell me what i'm doing wrong in the following code or where i'm
wrong in the sendRedirect concept.


// This code exists in doGet method of Servlet1:port1

String param = req.getParameter("method");
if ( param == null )
{
  res.getOutputStream().println("<html> <body> <p>  Going to get the
param Value !!!  </p></body> </html>");
  try
  {
     servletContext.log("Going to redirect the URL !!!");

res.sendRedirect("http://localhost:port/servlet/SampleServlet2?method=SendList";);

   }
   catch(Exception ex)
   {
       servletContext.log("Exception Message : " + ex.getMessage());
    }
    res.getOutputStream().println("<html> <body> <p>  Got the param
Value : NULL  </p> </body> </html>");
    servletContext.log("Param value null !!! ");
}


Regards
G S Sundaram

___________________________________________________________________________
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