01: /*
02: * Created on September 2004, the 16th
03: * By the Message Center Team
04: */
05: package mc.formgenerator.servlets.bonita;
06:
07: import java.io.IOException;
08:
09: import javax.servlet.http.*;
10:
11: /**
12: * Servlet that will show user his work list in order to allow him to start an activity
13: *
14: */
15: public class ServletWorkList extends HttpServlet {
16:
17: /**
18: * Get request
19: * @throws IOException
20: */
21: public void doGet(HttpServletRequest req, HttpServletResponse res)
22: throws IOException {
23:
24: //Create the model corresponding to this controller
25: ModelWorkList modelWorkList = new ModelWorkList();
26:
27: //Get the session of the user.
28: HttpSession session = req.getSession(true);
29:
30: //Save in the session the model which has the information to display.
31: session.setAttribute("modelWorkList", modelWorkList);
32:
33: try {
34: //Asks to the model to do its work
35: modelWorkList.process();
36:
37: //The request is redirected on the JSP page so that it builds the answer for the user.
38: this .getServletContext().getRequestDispatcher(
39: "/web/jsp/worklist.jsp").forward(req, res);
40:
41: } catch (Exception e) {
42: e.printStackTrace();
43: res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
44: e.getMessage());
45: }
46: }
47: }
|