edu.mssm.crover.scentral
Class ResourceFile

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--edu.mssm.crover.scentral.ResourceFile
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ResourceFile
extends javax.servlet.http.HttpServlet

Serves files directly from the jar. HTML, or images files can be included in the jar distribution and served to the client. This ensure that resource files are up-to-date relative to the code that uses them. The servlet is invoked with a parameter, filename=fn where fn is the name of the resource file to be returned to the client.

See Also:
Serialized Form

Constructor Summary
ResourceFile()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 java.io.InputStream findResourceInputStream(ServletCentral sc, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String file_name)
           
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFile

public ResourceFile()
Method Detail

doPost

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

findResourceInputStream

public java.io.InputStream findResourceInputStream(ServletCentral sc,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   java.lang.String file_name)

doGet

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


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.