Class CSVServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class CSVServlet
    extends javax.servlet.http.HttpServlet
    This servlet is used to download a CSV file created in the client side.
    Since:
    6.3
    Author:
    Marco Meschieri - LogicalDOC
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CSVServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doGet​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Gets the file user_home/tmp/export.csv
      void doPost​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Stores the generated export document into the user_home/tmp/export.csv temporary file
      void get​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, File export)
      Downloads file user_home/tmp/export.csv and deletes it
      • Methods inherited from class javax.servlet.http.HttpServlet

        service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
    • Constructor Detail

      • CSVServlet

        public CSVServlet()
    • Method Detail

      • doPost

        public void doPost​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws javax.servlet.ServletException,
                           IOException
        Stores the generated export document into the user_home/tmp/export.csv temporary file
        Parameters:
        request - the HTTP request
        response - the HTTP response
        Throws:
        javax.servlet.ServletException - error in the servlet container
        IOException - error writing the CSV file
      • doGet

        public void doGet​(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws javax.servlet.ServletException,
                          IOException
        Gets the file user_home/tmp/export.csv
        Parameters:
        request - the HTTP request
        response - the HTTP response
        Throws:
        javax.servlet.ServletException - error in the servlet container
        IOException - error reading the CSV file
      • get

        public void get​(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        File export)
                 throws javax.servlet.ServletException
        Downloads file user_home/tmp/export.csv and deletes it
        Parameters:
        request - the HTTP request
        response - the HTTP response
        export - the file that will receive the report and then will be deleted
        Throws:
        javax.servlet.ServletException - error in the servlet container