1 Reply Latest reply on Oct 30, 2018 11:10 AM by 3660209

    Custom jsp with servlet in R12.1.3

    3660209

      Dear Team,

       

      I am new to jsp , kindly help me to call custom servlet in jsp.

       

      I have created custom jsp page  and compile which worked. Below is the code

       

      Error : Failed to open <<url>>/OA_HTML/UploadServlet

       

      Servlet call in jsp page

      =================

      <form method="post" action="UploadServlet" enctype="multipart/form-data">

      Select file to upload:

          <p><input type="file" name="dataFile" id="fileChooser" /> 

          <input type="submit" value="Upload" multiple="multiple" /></p>

      </form>

       

      UploadServlet code

      ===============

       

      package oracle.apps.xxdm.jsp.webui;

       

       

      import java.io.File;

      import java.io.IOException;

      import java.util.List;

      import javax.servlet.ServletException;

      import javax.servlet.http.HttpServlet;

      import javax.servlet.http.HttpServletRequest;

      import javax.servlet.http.HttpServletResponse;

       

       

      import oracle.apps.fnd.common.WebAppsContext;

       

       

      import oracle.apps.fnd.sso.Utils;

       

       

       

       

      public class UploadServlet

        extends HttpServlet

      {

        public UploadServlet()

        {

        }

       

        //@Override

           protected void doPost(HttpServletRequest request, HttpServletResponse response)

                   throws ServletException, IOException {

             WebAppsContext webappscontext;

                boolean flag;

                boolean flag1;

                String s6;

                webappscontext = Utils.getAppsContext();   

             Utils.writeToLog("oracle.apps.fnd.sso.FNDSSOLoginRedirect", "Testing XXXXXX", webappscontext);

             throw new ServletException("Teting");

                  

            

           }

      }