| java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet org.zkforge.fckez.connector.ConnectorServlet
ConnectorServlet | public class ConnectorServlet extends HttpServlet (Code) | | Servlet to upload and browse files.
This servlet accepts 4 commands used to retrieve and create files and folders
from a server directory. The allowed commands are:
- GetFolders: Retrive the list of directory under the current folder
- GetFoldersAndFiles: Retrive the list of files and directory under the
current folder
- CreateFolder: Create a new directory under the current folder
- FileUpload: Send a new file to the server (must be sent with a POST)
author: Simone Chiaretta (simo@users.sourceforge.net) |
Method Summary | |
public void | doGet(HttpServletRequest request, HttpServletResponse response) Manage the Get requests (GetFolders, GetFoldersAndFiles, CreateFolder).
The servlet accepts commands sent in the following format:
connector?Command=CommandName&Type=ResourceType&CurrentFolder=FolderPath
It execute the command and then return the results to the client in XML
format. | public void | doPost(HttpServletRequest request, HttpServletResponse response) Manage the Post requests (FileUpload).
The servlet accepts commands sent in the following format:
connector?Command=FileUpload&Type=ResourceType&CurrentFolder=FolderPath
It store the file (renaming it in case a file with the same name exists)
and then return an HTML file with a javascript command in it. | public void | init() Initialize the servlet.
Retrieve from the servlet configuration the "baseDir" which is the root
of the file repository:
If not specified the value of "/UserFiles/" will be used. |
doGet | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code) | | Manage the Get requests (GetFolders, GetFoldersAndFiles, CreateFolder).
The servlet accepts commands sent in the following format:
connector?Command=CommandName&Type=ResourceType&CurrentFolder=FolderPath
It execute the command and then return the results to the client in XML
format.
|
doPost | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code) | | Manage the Post requests (FileUpload).
The servlet accepts commands sent in the following format:
connector?Command=FileUpload&Type=ResourceType&CurrentFolder=FolderPath
It store the file (renaming it in case a file with the same name exists)
and then return an HTML file with a javascript command in it.
|
init | public void init() throws ServletException(Code) | | Initialize the servlet.
Retrieve from the servlet configuration the "baseDir" which is the root
of the file repository:
If not specified the value of "/UserFiles/" will be used.
|
Methods inherited from javax.servlet.http.HttpServlet | protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected long getLastModified(HttpServletRequest req)(Code)(Java Doc) protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(Code)(Java Doc)
|
|
|