List of usage examples for javax.servlet.http HttpServletRequest setAttribute
public void setAttribute(String name, Object o);
From source file:com.glaf.base.modules.todo.springmvc.TodoController.java
/** * TODO/*from w w w . j a v a 2 s . co m*/ * * @return */ @RequestMapping(params = "method=indexList") public ModelAndView indexList(ModelMap modelMap, HttpServletRequest request) { RequestUtils.setRequestParameterToAttribute(request); List<Todo> rows = todoService.getAllTodoList(); request.setAttribute("rows", rows); return new ModelAndView("/modules/sys/todo/indexList", modelMap); }
From source file:com.glaf.base.modules.todo.springmvc.TodoController.java
/** * TODO//from www.j a v a 2 s . co m * * @return */ @RequestMapping(params = "method=list") public ModelAndView list(ModelMap modelMap, HttpServletRequest request) { RequestUtils.setRequestParameterToAttribute(request); List<Todo> rows = todoService.getAllTodoList(); request.setAttribute("rows", rows); return new ModelAndView("/modules/sys/todo/list", modelMap); }
From source file:com.glaf.base.modules.todo.springmvc.TodoController.java
/** * TODO/*from w w w . j ava2 s . c o m*/ * * @return */ @RequestMapping(params = "method=taskList") public ModelAndView taskList(ModelMap modelMap, HttpServletRequest request) { RequestUtils.setRequestParameterToAttribute(request); List<Todo> rows = todoService.getAllTodoList(); request.setAttribute("rows", rows); return new ModelAndView("/modules/sys/todo/taskList", modelMap); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.administrativeOffice.candidacy.DFAPeriodsManagementDispatchAction.java
public ActionForward prepareEditCandidacyPeriod(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { final ExecutionDegree executionDegree = getExecutionDegree(request); request.setAttribute("executionDegree", executionDegree); request.setAttribute("candidacyPeriod", executionDegree.getDegreeCurricularPlan().getCandidacyPeriod(executionDegree.getExecutionYear())); return mapping.findForward("editCandidacyPeriod"); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.administrativeOffice.candidacy.DFAPeriodsManagementDispatchAction.java
public ActionForward prepareEditRegistrationPeriod(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { final ExecutionDegree executionDegree = getExecutionDegree(request); request.setAttribute("executionDegree", executionDegree); request.setAttribute("registrationPeriod", executionDegree.getDegreeCurricularPlan() .getRegistrationPeriod(executionDegree.getExecutionYear())); return mapping.findForward("editRegistrationPeriod"); }
From source file:com.aoindustries.website.signup.SignupCustomizeServerActionHelper.java
public static void setConfirmationRequestAttributes(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, SignupSelectPackageForm signupSelectPackageForm, SignupCustomizeServerForm signupCustomizeServerForm) throws IOException, SQLException { // Lookup things needed by the view AOServConnector rootConn = SiteSettings.getInstance(servletContext).getRootAOServConnector(); PackageDefinition packageDefinition = rootConn.getPackageDefinitions() .get(signupSelectPackageForm.getPackageDefinition()); // Store as request attribute for the view request.setAttribute("monthlyRate", getHardwareMonthlyRate(rootConn, signupCustomizeServerForm, packageDefinition)); request.setAttribute("powerOption", getPowerOption(rootConn, signupCustomizeServerForm)); request.setAttribute("cpuOption", getCpuOption(rootConn, signupCustomizeServerForm)); request.setAttribute("ramOption", getRamOption(rootConn, signupCustomizeServerForm)); request.setAttribute("sataControllerOption", getSataControllerOption(rootConn, signupCustomizeServerForm)); request.setAttribute("scsiControllerOption", getScsiControllerOption(rootConn, signupCustomizeServerForm)); request.setAttribute("diskOptions", getDiskOptions(rootConn, signupCustomizeServerForm)); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.messaging.ViewSentEmailsDA.java
public ActionForward viewEmail(final ActionMapping mapping, final HttpServletRequest request, final Message message) { request.setAttribute("message", message); return mapping.findForward("view.email"); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.student.candidacy.EditMissingCandidacyInformationDA.java
public ActionForward prepareEditInstitutionPostback(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { request.setAttribute("personalInformationsWithMissingInformation", getPersonalInformationsWithMissingInfo()); PersonalInformationBean personalInformationBean = getRenderedObject("personalInformationBean"); personalInformationBean.resetDegree(); request.setAttribute("personalInformationBean", personalInformationBean); RenderUtils.invalidateViewState();/*w ww . ja va 2 s . c o m*/ return mapping.findForward("editMissingPersonalInformation"); }
From source file:com.liferay.portal.servlet.SharedServletWrapper.java
public void service(ServletRequest req, ServletResponse res) throws IOException, ServletException { if ((_httpServletInstance == null) || (GetterUtil.getBoolean(PropsUtil.get(PropsUtil.TCK_URL)))) { _servletInstance.service(req, res); } else {//from w ww. j a v a2s . c om HttpServletRequest httpReq = (HttpServletRequest) req; String sharedSessionId = CookieUtil.get(httpReq.getCookies(), CookieKeys.SHARED_SESSION_ID); _log.debug("Shared session id is " + sharedSessionId); HttpSession portalSes = null; if (sharedSessionId != null) { portalSes = SharedSessionPool.get(sharedSessionId); } HttpSession portletSes = httpReq.getSession(); if (portalSes == null) { portalSes = portletSes; } else { try { portalSes.getCreationTime(); } catch (IllegalStateException ise) { _log.debug("Removing session from pool"); SharedSessionPool.remove(sharedSessionId); portalSes = portletSes; } } HttpServletRequest sharedReq = new SharedServletRequest(httpReq, portalSes); sharedReq.setAttribute(WebKeys.SERVLET_CONTEXT_NAME, _servletContextName); _httpServletInstance.service(sharedReq, res); sharedReq.removeAttribute(WebKeys.SERVLET_CONTEXT_NAME); } }
From source file:cn.vlabs.umt.ui.servlet.LoginServlet.java
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { addCrossDomainHeader(response);/*from w w w.j a v a 2 s. c o m*/ saveParams(request); request.setAttribute("basePath", request.getServerPort()); LocalLogin login = new LocalLogin(factory); login.doLogin(request, response); }