org.barracudamvc.core.helper.servlet
Class ResourceGateway

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.barracudamvc.core.helper.servlet.ResourceGateway
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ResourceGateway
extends javax.servlet.http.HttpServlet

The purpose of this servlet is to look for a static resource on the classpath and return it to the client

See Also:
Serialized Form

Field Summary
static String EXT_RESOURCE_ID
           
protected static org.apache.log4j.Logger logger
           
static String RESOURCE_NOT_FOUND
           
protected static long startup
           
 
Constructor Summary
ResourceGateway()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          By default the GET request is mapped to the handleDefault method
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          By default the POST request is mapped to the handleDefault method
 void handleDefault(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          Handle the default HttpRequest.
 void init()
          Here's where we initialize the servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

EXT_RESOURCE_ID

public static String EXT_RESOURCE_ID

RESOURCE_NOT_FOUND

public static String RESOURCE_NOT_FOUND

startup

protected static final long startup
Constructor Detail

ResourceGateway

public ResourceGateway()
Method Detail

handleDefault

public void handleDefault(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse resp)
                   throws javax.servlet.ServletException,
                          IOException

Handle the default HttpRequest.

Parameters:
req - the servlet request
resp - the servlet response
Throws:
javax.servlet.ServletException
IOException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     IOException

By default the GET request is mapped to the handleDefault method

Parameters:
req - the servlet request
resp - the servlet response
Throws:
javax.servlet.ServletException
IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      IOException

By default the POST request is mapped to the handleDefault method

Parameters:
req - the servlet request
resp - the servlet response
Throws:
javax.servlet.ServletException
IOException

init

public void init()
          throws javax.servlet.ServletException

Here's where we initialize the servlet.

Throws:
javax.servlet.ServletException


Copyright © 2004 BarracudaMVC.org All Rights Reserved.