Package de.businesscode.bcdui.toolbox
Class DownloadServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
de.businesscode.bcdui.toolbox.DownloadServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class DownloadServlet
extends jakarta.servlet.http.HttpServlet
Supports lazy mirroring SFTP files to local folder for download
Keeps track of download statistics and deletes files older than given days
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handles the HTTPGETmethod for a file and check if it is already local or needs to be mirrored from SFTP.voidinit(jakarta.servlet.ServletConfig config) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
DownloadServlet
public DownloadServlet()
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletException
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException Handles the HTTPGETmethod for a file and check if it is already local or needs to be mirrored from SFTP.- Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Parameters:
request- anHttpServletRequestobject that contains the request the client has made of the servletresponse- anHttpServletResponseobject that contains the response the servlet sends to the client- Throws:
jakarta.servlet.ServletExceptionIOException
-