winstone
Class StaticResourceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by winstone.StaticResourceServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class StaticResourceServlet
extends HttpServlet

Servlet to handle static resources. Simply finds and sends them, or dispatches to the error servlet.

Version:
$Id: StaticResourceServlet.java,v 1.17 2004/12/31 07:21:00 rickknowles Exp $
Author:
Rick Knowles
See Also:
Serialized Form

Constructor Summary
StaticResourceServlet()
           
 
Method Summary
static java.lang.String constructOurCanonicalVersion(java.io.File current, java.io.File stopPoint)
           
 void doGet(HttpServletRequest request, HttpServletResponse response)
           
 void doPost(HttpServletRequest request, HttpServletResponse response)
           
 void init(ServletConfig config)
           
static boolean isDescendant(java.io.File parent, java.io.File child, java.io.File commonBase)
           
 
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
 

Constructor Detail

StaticResourceServlet

public StaticResourceServlet()
Method Detail

init

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

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   java.io.IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
java.io.IOException

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  java.io.IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
java.io.IOException

isDescendant

public static boolean isDescendant(java.io.File parent,
                                   java.io.File child,
                                   java.io.File commonBase)
                            throws java.io.IOException
Throws:
java.io.IOException

constructOurCanonicalVersion

public static java.lang.String constructOurCanonicalVersion(java.io.File current,
                                                            java.io.File stopPoint)


Copyright © 2013. All Rights Reserved.