1 5 package mc.formgenerator.servlets.bonita; 6 7 import java.io.File ; 8 import java.io.IOException ; 9 10 import javax.servlet.http.*; 11 12 17 public class ServletWorkList extends HttpServlet { 18 19 20 21 22 26 public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException { 27 28 ModelWorkList modelWorkList = new ModelWorkList(); 30 31 RepositoryFacade repositoryFacade = new RepositoryFacade(getServletConfig().getServletContext().getRealPath("") + File.separator + "web" + File.separator+ "repository.xml"); 34 35 HttpSession session = req.getSession(true); 37 38 session.setAttribute("modelWorkList", modelWorkList); 40 41 session.setAttribute("repositoryFacade",repositoryFacade); 43 44 try{ 45 modelWorkList.process(); 47 48 this.getServletContext().getRequestDispatcher("/web/jsp/worklist.jsp").forward(req,res); 50 51 } 52 catch(Exception e){ 53 e.printStackTrace(); 54 res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage()); 55 } 56 } 57 } 58 | Popular Tags |