protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { dao = new ConnectionPool(); request.getSession().setAttribute("access", "user"); Action action = ActionFactory.getAction(request); user = (UserDAO) action.handleRequest(request, response, dao); // ------------ User myInfo = user.getMyAccont(); // ------------ request.setAttribute("user", user); // delete! don't need transferring // ------------ HttpSession lastAct = request.getSession(); String la = (String) lastAct.getAttribute("lastActions"); if (la.compareTo("/view/user.jsp") == 0) { super.forward("/view/user.jsp", request, response); } else { super.forward(la, request, response); } }
public void destroy() { WebApplicationContext webContext = getWebApplicationContext(); GrailsApplication application = (GrailsApplication) webContext.getBean(GrailsApplication.APPLICATION_ID, GrailsApplication.class); GrailsClass[] bootstraps = application.getArtefacts(BootstrapArtefactHandler.TYPE); for (int i = 0; i < bootstraps.length; i++) { ((GrailsBootstrapClass) bootstraps[i]).callDestroy(); } super.destroy(); }
protected void initFrameworkServlet() throws ServletException, BeansException { super.initFrameworkServlet(); initMultipartResolver(); }
public ServletHttpServer(URL url, HttpHandler handler) { super(url, handler); DispatcherServlet.addHttpHandler(url.getPort(), handler); }