SK.gnome.dwarf.http.servlet
Class JARFileServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
SK.gnome.dwarf.http.servlet.JARFileServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class JARFileServlet
- extends javax.servlet.http.HttpServlet
This servlet serves files from a JAR file.
The JAR file pathname must be specified via the "jarFile" initial parameter.
It accepts initial parameter named "defaultPages", which must be a comma-separated
list of file names, for example "index.jsp,index.html". A default page is a page which
is served if no particular file from the directory has been requested by the end user.
This servlet overrides the superclass' getLastModified method to check for the
last modification time of the requested files.
Important: this serlvet works properly only for files whose MIME type can be
recognized by the server.
- See Also:
- Serialized Form
Method Summary |
void |
destroy()
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected long |
getLastModified(javax.servlet.http.HttpServletRequest request)
|
java.lang.String |
getServletInfo()
|
void |
init()
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doOptions, doPut, doTrace, service, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JARFileServlet
public JARFileServlet()
init
public void init()
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
getServletInfo
public java.lang.String getServletInfo()
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Throws:
java.io.IOException
javax.servlet.ServletException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Throws:
java.io.IOException
javax.servlet.ServletException
getLastModified
protected long getLastModified(javax.servlet.http.HttpServletRequest request)
Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.