org.mycore.frontend.servlets
Class MCRZipFileNodeServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.mycore.frontend.servlets.MCRServlet
              extended by org.mycore.frontend.servlets.MCRZipFileNodeServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class MCRZipFileNodeServlet
extends MCRServlet

This servlet support the extraction form a requested file from a zip archive. The name of the zip archive is like the root directory of the requested file path. As sample the request is http://localhost:1234/servlets/MCRZiFileNodeServlet/Project_derivate_00000001/test/dir/file2 the stored zip file is test.zip that includes test/dir/file2. This construct is helpful to use to free Zoomify solution.

Version:
$Revision: 15202 $ $Date: 2008-01-14 11:02:17 +0000 (Mo, 14 Jan 2008) $
Author:
Stefan Freitag, Jens Kupferschmidt, Frank Lützenkirchen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
BASE_URL_ATTRIBUTE, trustedProxies
 
Constructor Summary
MCRZipFileNodeServlet()
           
 
Method Summary
 void doGetPost(MCRServletJob job)
          Handles the HTTP request
protected  void errorPage(HttpServletRequest req, HttpServletResponse res, int error, String msg, Exception ex, boolean xmlstyle)
          Forwards the error to generate the output
protected static String getOwnerID(HttpServletRequest request)
          The method return the MyCoRe IFS owner ID (DerivateID) from the requested path.
 
Methods inherited from class org.mycore.frontend.servlets.MCRServlet
buildRedirectURL, doGet, doGet, doPost, doPost, generateActiveLinkErrorpage, generateErrorPage, getBaseURL, getLastModified, getLayoutService, getProperty, getRemoteAddr, getServletBaseURL, getSession, handleException, init, initTrustedProxies, render, reportException, think
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, 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

MCRZipFileNodeServlet

public MCRZipFileNodeServlet()
Method Detail

doGetPost

public void doGetPost(MCRServletJob job)
               throws Exception
Handles the HTTP request

Overrides:
doGetPost in class MCRServlet
Throws:
Exception

getOwnerID

protected static String getOwnerID(HttpServletRequest request)
The method return the MyCoRe IFS owner ID (DerivateID) from the requested path.

Parameters:
request - the HTTP request
Returns:
the string with the MyCoRe IFS owner ID (DerivateID)

errorPage

protected void errorPage(HttpServletRequest req,
                         HttpServletResponse res,
                         int error,
                         String msg,
                         Exception ex,
                         boolean xmlstyle)
                  throws IOException
Forwards the error to generate the output

Throws:
IOException
See Also:
overwritten in jspdocportal