session « Session « JSP-Servlet Q&A





1. Session in HTTPServlet    coderanch.com

Hi, I have a servlet that extends HTTPServlet and implements servlet. In the doPost I handle upload with apache commons upload FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); /** a class that implements apache commons ProgressListener */ FileUploadListener listener = new FileUploadListener(); HttpSession session = request.getSession(true); session.setAttribute("FILE-UPLOAD-LISTENER", listener); upload.setProgressListener(listener); When trying to access the FILE-UPLOAD-LISTENER in doGet that ...