public class ZipFiles extends HttpServlet
<servlet> <servlet-name>ZipFiles</servlet-name> <servlet-class>ca.bc.webarts.servlet.ZipFiles</servlet-class> </servlet> <servlet-mapping> <servlet-name>ZipFiles</servlet-name> <url-pattern>/zipfiles/*</url-pattern> </servlet-mapping> </servlet>
Modifier and Type | Field and Description |
---|---|
private String |
browserName
not used.
|
private String |
browserVersion
not used.
|
private static String |
BUILD_TAG
Build String.
|
protected static String |
className_
Class constant.
|
private String |
debugOut
controls if extra info is dumped to system.out.
|
private boolean |
debugOut_ |
private String |
dirname
Servlet parameter to specify the specific directory to zip up and return; OR if a filename is ALSO specified, the dire where the file exists.
|
private String |
filename
Servlet parameter to specify the specific file(name) to zip up and return.
|
private boolean |
fileZip_
flag if the parms have specified a file (true) or a dir (false) to zip.
|
private static long |
serialVersionUID |
private static String |
SERVLET_VERSION
Version String.
|
private String |
someParamYouWannaSet_ |
private static String |
SYSTEM_FILE_SEPERATOR |
private boolean |
validParms_
flag if the parms are valid.
|
private static String |
webServerHostName_ |
Constructor and Description |
---|
ZipFiles() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Override to close Things up.
|
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Servlet get processing method.
|
String |
getServletInfo()
Gets the ServletInfo attribute of this servlet
|
void |
init()
The one time servlet init stuff goes here.
|
private static File |
initDirFile(String s)
Initisalizes File only if it is directory.It is represented by the passed
in String.
|
private ArrayList<File> |
listDirFiles(String d)
Takes a dirname and lists the contained files in an ArrayList for easier processing.
|
private void |
parseParams(HttpServletRequest req)
Parses any defined servlet params into the defined class vars.
|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
private static final long serialVersionUID
protected static final String className_
private static final String SYSTEM_FILE_SEPERATOR
private static final String SERVLET_VERSION
private static final String BUILD_TAG
private static String webServerHostName_
private boolean debugOut_
private boolean fileZip_
private boolean validParms_
private String browserName
private String browserVersion
private String filename
private String dirname
private String someParamYouWannaSet_
public ZipFiles()
public String getServletInfo()
getServletInfo
in interface Servlet
getServletInfo
in class GenericServlet
public void init()
init
in class GenericServlet
public void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
private void parseParams(HttpServletRequest req)
private static File initDirFile(String s)
s
- the directory name to init as a Fileprivate ArrayList<File> listDirFiles(String d)
d
- the directory name to scan for Filespublic void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet
in class HttpServlet
ServletException
IOException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses