File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes sendError method - page not found? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "sendError method - page not found?" Watch "sendError method - page not found?" New topic
Author

sendError method - page not found?

Richard Agnes
Greenhorn

Joined: Feb 12, 2001
Posts: 22
I am just new to servlets having just set up environment the other day. In my doPost Method of an HttpServlet I have:
switch (err)
{
case DUP_SUBSCRIPTION:
res.sendError(HttpServletResponse.SC_BAD_REQUEST, "information already on file");
return;
case NOT_ON_FILE:
res.sendError(HttpServletResponse.SC_BAD_REQUEST, "information not on file");
return;
}
however when the code executes I get a page not found error instead of the error message, could someone suggest why, is it something to do with my configuration?
edit: I just noticed that the error page does have the correct error code. does this mean IE 5.0 only has a generic message?
thanks in advance.
[This message has been edited by Richard Agnes (edited July 12, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sendError method - page not found?