EAF 7.4 Implementation

org.enhydra.servlet.servlets
Class JarServerServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.enhydra.servlet.servlets.JarServerServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JarServerServlet
extends javax.servlet.http.HttpServlet

This class serves files from jar/zip files for HTTP requests. Currently only a limited Http GET request will be processed. CGI arguments will not be processed. The initArg "jarFile" sets the name of the jar or zip file to serve files from.

Version:
$Revision: 1.7 $
See Also:
Serialized Form

Constructor Summary
JarServerServlet()
          Create a new JarServerServlet.
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This method will process a limited http GET request for a file.
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Http POST command is currently not supported and indicates this sending a message to the client.
 java.lang.String getServletInfo()
          Returns a string containing servlet information including name, and jarFile.
 void init(javax.servlet.ServletConfig config)
          This initializes the servlet and gets the jarFile parameter.
 java.lang.String toHtml()
          Extra status info, shown by the Enhydra Server admin status page.
 
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, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarServerServlet

public JarServerServlet()
Create a new JarServerServlet.

Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
This initializes the servlet and gets the jarFile parameter.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - The servlet configuration object.
Throws:
If - an exception occured during initialztion
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.servlet.ServletException,
                  java.io.IOException
This method will process a limited http GET request for a file. The method will serve files, but will not process cgi arguments.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
req - encapsulates the request to the servlet.
res - encapsulates the response from the servlet.
Throws:
if - the request could not be handled.
if - detected when processing.
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException,
                   java.io.IOException
Http POST command is currently not supported and indicates this sending a message to the client.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
req - encapsulates the request to the servlet.
res - encapsulates the response from the servlet.
Throws:
if - the request could not be handled.
if - detected when processing.
javax.servlet.ServletException
java.io.IOException

getServletInfo

public java.lang.String getServletInfo()
Returns a string containing servlet information including name, and jarFile.

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet
Returns:
Servlet information.

toHtml

public java.lang.String toHtml()
Extra status info, shown by the Enhydra Server admin status page.


EAF 7.4 Implementation