See Thread at: http://www.techienuggets.com/Detail?tx=12338 Posted on behalf of a User
OK. My fault. This works: else { response.sendError(404, ""); return; } Now when I look in my http server log I see a status of 404 with the original URL. Thanks for your help. In Response To: It didn't work. I got a 500 later in my code. Here's what I did: if(detail.size() > 0) { dbutil = new DBUtil(getServletConfig().getInitParameter(Constants.JNDI_NAME)); dbutil.executeNoResults(updateSql); dbutil.cleanup(); session.setAttribute("title", title); session.setAttribute("desc", title); session.setAttribute("keywords", keywords); dispatcher = getServletContext().getRequestDispatcher("/displayArticle.jsp"); } else response.sendError(404, ""); // dispatcher = getServletContext().getRequestDispatcher("/404.jsp"); Notice I commented out the code that would later dispatch to 404.jsp. Here's my entry from web.xml: </error-page> <error-page> <error-code>404</error-code> <location>/404.jsp</location> </error-page> Looks like the 404 page isn't being invoked by the response.sendError(404, ""); --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]