How do I fix the part of code for the following error code:
Exception java.io.IOException must be caught, or it must be declared in the throws clause of this method.
ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
From the area of my servlet below:
private void handleException(HttpServletResponse response, Exception e)
{
e.printStackTrace();
ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
out.writeObject(e.getMessage());
out.flush();
out.close();
}
Exception java.io.IOException must be caught, or it must be declared in the throws clause of this method.
ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
From the area of my servlet below:
private void handleException(HttpServletResponse response, Exception e)
{
e.printStackTrace();
ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
out.writeObject(e.getMessage());
out.flush();
out.close();
}