it.unimi.di.mg4j.query
Class FileSystemItem

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by it.unimi.di.mg4j.query.FileSystemItem
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class FileSystemItem
extends HttpServlet

An item serving a file from the file system.

This kind of QueryServlet item will load into the browser the file specified by the parameter uri. Its only purpose is to work around security problems that forbid in some browsers (e.g., Firefox) to link a file in the file system from a page retrieved from an HTTP server.

When this class is loaded, it creates the singleton HttpFileServer and caches it to avoid class garbage collection.

See Also:
Serialized Form

Constructor Summary
FileSystemItem()
           
 
Method Summary
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
protected  void doPost(HttpServletRequest request, HttpServletResponse response)
           
 void init()
           
 
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, 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

FileSystemItem

public FileSystemItem()
Method Detail

init

public void init()
Overrides:
init in class GenericServlet

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws IOException
Overrides:
doGet in class HttpServlet
Throws:
IOException

doPost

protected void doPost(HttpServletRequest request,
                      HttpServletResponse response)
               throws IOException
Overrides:
doPost in class HttpServlet
Throws:
IOException