Class UploadServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
de.businesscode.bcdui.upload.data.UploadServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class UploadServlet extends jakarta.servlet.http.HttpServlet
Entry point for all data data upload related steps, supports POST and PUT Add custom steps in web.xml in the following format: <init-param> <param-name>Steps</param-name> <param-value> MY_STEP_NAME: de.my.package.ClassName; MY_STEP_NAME2: de.my.package.ClassName2; </param-value> </init-param --> Such Steps - need a Constructor getting (UploadControl uc, String userId) - implement IUploadStep - if writing, call UploadControl#addStepResult() at the end of their process()
See Also:
  • Field Details

  • Constructor Details

    • UploadServlet

      public UploadServlet()
  • Method Details

    • service

      protected void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException
      Receives an data upload file and creates an entry in bcd_dataupload_control
      Overrides:
      service in class jakarta.servlet.http.HttpServlet
      Parameters:
      request -
      response -
      Throws:
      jakarta.servlet.ServletException
    • getUserId

      protected String getUserId()
      Returns:
      userId (or a predefined string ANONYMOUS_ID) if no user is known
    • getMultipartParam

      protected String getMultipartParam(jakarta.servlet.http.Part part, String paramName)
      Retrieve the filename of the data upload file from http header
      Parameters:
      part -
      paramName -
      Returns:
    • init

      public void init() throws jakarta.servlet.ServletException
      Overrides:
      init in class jakarta.servlet.GenericServlet
      Throws:
      jakarta.servlet.ServletException
    • getTransformSQL

      public static String getTransformSQL(String sql)
    • getControlConnection

      public static Connection getControlConnection() throws Exception
      Throws:
      Exception