ajax.gui.servlets
Class FileServer

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--ajax.gui.servlets.AjaxServlet
                    |
                    +--ajax.gui.servlets.FileServer
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class FileServer
extends AjaxServlet

See Also:
Serialized Form

Fields inherited from class ajax.gui.servlets.AjaxServlet
busy
 
Constructor Summary
FileServer()
           
 
Method Summary
protected static boolean allowedFile(java.lang.String fileName, java.lang.String[] fileArray)
          Checks the fileName into the fileArray
protected  void desactivateCache(javax.servlet.http.HttpServletResponse resp)
          desactivate cache for http response
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          The method processing POST request
protected static void serveFile(java.lang.String fileName, javax.servlet.http.HttpServletResponse resp)
          Serves a file as response
 
Methods inherited from class ajax.gui.servlets.AjaxServlet
accessOk, getAjax, notOkMessage
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileServer

public FileServer()
Method Detail

allowedFile

protected static boolean allowedFile(java.lang.String fileName,
                                     java.lang.String[] fileArray)
Checks the fileName into the fileArray

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse resp)
           throws javax.servlet.ServletException,
                  java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse resp)
            throws javax.servlet.ServletException,
                   java.io.IOException
The method processing POST request
Overrides:
doPost in class javax.servlet.http.HttpServlet

serveFile

protected static void serveFile(java.lang.String fileName,
                                javax.servlet.http.HttpServletResponse resp)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Serves a file as response

desactivateCache

protected void desactivateCache(javax.servlet.http.HttpServletResponse resp)
desactivate cache for http response
Overrides:
desactivateCache in class AjaxServlet
Parameters:
resp - http response