fnug
Class ResourceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by fnug.ResourceServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ResourceServlet
extends javax.servlet.http.HttpServlet

Servlet serving resources.

Author:
Martin Algesten
See Also:
Serialized Form

Field Summary
static String CONTENT_TYPE_JS
           
static String CONTENT_TYPE_JSON
           
static String UTF_8
           
 
Constructor Summary
ResourceServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doHead(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  long getLastModified(javax.servlet.http.HttpServletRequest req)
           
 void init(javax.servlet.ServletConfig config)
           
protected  void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPost, doPut, doTrace, 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

UTF_8

public static final String UTF_8
See Also:
Constant Field Values

CONTENT_TYPE_JSON

public static final String CONTENT_TYPE_JSON
See Also:
Constant Field Values

CONTENT_TYPE_JS

public static final String CONTENT_TYPE_JS
See Also:
Constant Field Values
Constructor Detail

ResourceServlet

public ResourceServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

service

protected void service(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse resp)
                throws javax.servlet.ServletException,
                       IOException
Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

getLastModified

protected long getLastModified(javax.servlet.http.HttpServletRequest req)
Overrides:
getLastModified in class javax.servlet.http.HttpServlet

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doHead

protected void doHead(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      IOException
Overrides:
doHead in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException


Copyright © 2012. All Rights Reserved.