JSPservletPkg
Class JSPresourceServlet

JSPservletPkg.JSPresourceServlet

public class JSPresourceServlet

Resource handling servlet.

Copyright (c) 2000-2001

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; version 2
 of the License.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 

Version:
1, 0
Author:
Alexis Grandemange
See Also:
JSPhandler.ClassEntry, JSPloader

Field Summary
(package private)  JSPhandler.ClassEntry classEntry
           
private static java.text.SimpleDateFormat sdf
          SimpleDateFormat used to build RFC conformant strings
 
Constructor Summary
JSPresourceServlet(JSPhandler.ClassEntry ce)
          Constructor.
 
Method Summary
 void doGet(JSPservletPkg.HttpServletRequest request, JSPservletPkg.HttpServletResponse response)
          GET request handling.
static java.lang.String getJAR(java.lang.ClassLoader cl)
          Service method for servlet using RequestDispatcher.
 void init(JSPservletPkg.ServletConfig config)
          Invoked by Servlet container.
 

Field Detail

classEntry

JSPhandler.ClassEntry classEntry

sdf

private static final java.text.SimpleDateFormat sdf
SimpleDateFormat used to build RFC conformant strings
Constructor Detail

JSPresourceServlet

public JSPresourceServlet(JSPhandler.ClassEntry ce)
Constructor.
Parameters:
ce - ClassEntry that created it.
Method Detail

init

public void init(JSPservletPkg.ServletConfig config)
          throws JSPservletPkg.ServletException
Invoked by Servlet container.

doGet

public void doGet(JSPservletPkg.HttpServletRequest request,
                  JSPservletPkg.HttpServletResponse response)
GET request handling. No exception:
  1. The JES2 handling is rude.
  2. Exceptions are likely to happen because the response is already commited. So I silently return.
Parameters:
request - HttpServletRequest.
response - HttpServletResponse.

getJAR

public static final java.lang.String getJAR(java.lang.ClassLoader cl)
Service method for servlet using RequestDispatcher. Its use is optional. It returns the jar name part of the path. We recommend however its use as the servlet developer should not be aware of its packaging.

Parameters:
cl - ClassLoader.
Returns:
the jar string.