electric.servlet.httpget
Class HTTPGetServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byelectric.servlet.httpget.HTTPGetServlet
All Implemented Interfaces:
IHTTPConstants, IWebInfConstants, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public final class HTTPGetServlet
extends javax.servlet.http.HttpServlet
implements IHTTPConstants, IWebInfConstants

HTTPGetServlet serves files from the local filesystem. Its default welcome files are "index.html", "index.htm" and "index.jsp"

Author:
webMethods
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface electric.util.http.IHTTPConstants
ACCEPT_LANGUAGE, ACCEPT_RANGES, APPLICATION_BINARY, APPLICATION_OCTET_STREAM, ASCII, AUTHORIZATION, BASIC, BOUNDARY, CHARSET_EQUALS, CHUNKED, CLOSE, COLON_SLASH_SLASH, CONNECT, CONNECTION, CONTENT_ID, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_TYPE, CONTINUATION_STATUS, CONTINUE_EXPECTATION, COOKIE, COOKIE_LISTENER, DATE, DEFAULT_CONTENT_TYPE, DEFAULT_HTTP_CHARSET, DEFAULT_HTTPS_PORT, DEFAULT_MIME_TYPE, DEFAULT_PROXY_PORT, DIGEST, EOL, EXPECT, EXPECT_HEADER, FORM_URLENCODED, GET, GLUE_SESSION, HEAD, HOST, HTTP_1_0, HTTP_1_1, HTTP_PROTOCOL, HTTPS_PROTOCOL, IF_MODIFIED_SINCE, KEEP_ALIVE, LAST_MODIFIED, LOCATION, MD5_HASH, MIME_BOUNDARY, MIME_VERSION, MULTIPART_CONTENT_TYPE, OK, POST, PROXY_AUTHORIZATION, RANGE, SC_CONTINUE, SC_MOVED, SC_MOVED_PERMANENTLY, SC_OK, SC_PROXY_AUTHENTICATION_REQUIRED, SC_UNAUTHORIZED, SEPARATOR, SERVER, SERVER_PREFIX, SERVER_TYPE, SET_COOKIE_0, SET_COOKIE_1, SLASH, START, TEXT_HTML, TEXT_PLAIN, TEXT_XML, TEXT_XML_UTF_8, TRANSFER_ENCODING, USER_AGENT, WWW_AUTHENTICATE
 
Fields inherited from interface electric.servlet.webinf.IWebInfConstants
AUTH_CONSTRAINT, AUTH_METHOD, CONTEXT_PARAM, DISPLAY_NAME, ERROR_CODE, ERROR_PAGE, EXCEPTION_TYPE, EXTENSION, FILTER, FILTER_CLASS, FILTER_MAPPING, FILTER_NAME, FORM_LOGIN_CONFIG, INIT_PARAM, LISTENER, LISTENER_CLASS, LOAD_ON_STARTUP, LOCATION, LOGIN_CONFIG, MIME_MAPPING, MIME_TYPE, PARAM_NAME, PARAM_VALUE, REALM_NAME, ROLE_NAME, SECURITY_CONSTRAINT, SECURITY_ROLE, SERVLET, SERVLET_CLASS, SERVLET_MAPPING, SERVLET_MAPPING_SERVLET_NAME, SERVLET_NAME, URL_PATTERN, USER_DATA_CONSTRAINT_TRANSPORT_GUARANTEE, WEB_INF, WEB_RESOURCE_COLLECTION, WEB_RESOURCE_NAME, WEB_XML, WELCOME_FILE, WELCOME_FILE_LIST
 
Constructor Summary
HTTPGetServlet()
           
 
Method Summary
 void addWelcomeFile(java.lang.String filename)
          Add the specified filename as a welcome file.
static void enableDirectoryListing(boolean dirListing)
           
static int getBufferSize()
           
 void init(javax.servlet.ServletConfig config)
          Initialize the servlet.
 void removeWelcomeFile(java.lang.String filename)
          Remove the specified filename as a welcome file.
protected  void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Service the specified HTTP servlet request.
static void setBufferSize(int bufferSize)
           
static void setDefaultWelcomeFiles(java.lang.String[] defaultWelcomeFiles)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, 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

HTTPGetServlet

public HTTPGetServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initialize the servlet.

Specified by:
init in interface javax.servlet.Servlet
Parameters:
config - The config.
Throws:
javax.servlet.ServletException - If a servlet exception occurs.

service

protected void service(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.io.IOException
Service the specified HTTP servlet request.

Parameters:
request - The HTTP servlet request.
response - The HTTP servlet response.
Throws:
java.io.IOException - If an I/O exception occurs.

setDefaultWelcomeFiles

public static void setDefaultWelcomeFiles(java.lang.String[] defaultWelcomeFiles)
Parameters:
defaultWelcomeFiles -

addWelcomeFile

public void addWelcomeFile(java.lang.String filename)
Add the specified filename as a welcome file.

Parameters:
filename - The file name.

removeWelcomeFile

public void removeWelcomeFile(java.lang.String filename)
Remove the specified filename as a welcome file.

Parameters:
filename - The file name.

setBufferSize

public static void setBufferSize(int bufferSize)
Parameters:
bufferSize -

getBufferSize

public static int getBufferSize()

enableDirectoryListing

public static void enableDirectoryListing(boolean dirListing)
Parameters:
dirListing -


copyright© 2001-2004 by webMethods All Rights Reserved.