Hi,
I have a piece of code in the serlvlet like this:
try{
response.sendRedirect("page1.jsp");
}
catch(Exception e)
{
System.out.println(e.getMessage());
try{
response.sendRedirect("error.jsp");
}catch(Exception ex)
{
System.out.println(ex.getMessage());
}
}
if I keep the response.sendRedirect("error.jsp") without the try and catch block I get a compile error saying "Unreported IOException". That is why I put it under a try catch block. But now I want to make sure that this error is not just caught but also bubbled up...
how can I do that?
pat
I have a piece of code in the serlvlet like this:
try{
response.sendRedirect("page1.jsp");
}
catch(Exception e)
{
System.out.println(e.getMessage());
try{
response.sendRedirect("error.jsp");
}catch(Exception ex)
{
System.out.println(ex.getMessage());
}
}
if I keep the response.sendRedirect("error.jsp") without the try and catch block I get a compile error saying "Unreported IOException". That is why I put it under a try catch block. But now I want to make sure that this error is not just caught but also bubbled up...
how can I do that?
pat