org.mortbay.servlet
Class NotFoundServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.mortbay.servlet.NotFoundServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class NotFoundServlet
extends HttpServlet

Not Found Servlet. Utility servlet to protect a URI by always responding with 404.

Version:
$Revision: 1.4 $
Author:
Greg Wilkins (gregw)
See Also:
Serialized Form

Constructor Summary
NotFoundServlet()
           
 
Method Summary
 void doGet(HttpServletRequest req, HttpServletResponse res)
           
 void doPost(HttpServletRequest req, HttpServletResponse res)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotFoundServlet

public NotFoundServlet()
Method Detail

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   java.io.IOException
Parameters:
req - an HttpServletRequest object that contains the request the client has made of the servlet
res - an HttpServletResponse object that contains the response the servlet sends to the client
Throws:
java.io.IOException - if an input or output error is detected when the servlet handles the request
ServletException - if the request for the POST could not be handled
See Also:
ServletOutputStream, ServletResponse.setContentType(java.lang.String)

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
           throws ServletException,
                  java.io.IOException
Parameters:
req - an HttpServletRequest object that contains the request the client has made of the servlet
res - an HttpServletResponse object that contains the response the servlet sends to the client
Throws:
ServletException - if the request for the GET could not be handled
java.io.IOException - if an input or output error is detected when the servlet handles the GET request
See Also:
ServletResponse.setContentType(java.lang.String)


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.