List of usage examples for javax.servlet.http HttpServletRequest setAttribute
public void setAttribute(String name, Object o);
From source file:com.salesmanager.core.util.www.AuthenticateCustomerAction.java
private void prepareResponse(HttpServletRequest request, String returnCode, String authenticationToken, String messages) {//from w ww . j a v a 2 s. co m request.setAttribute("returnCode", returnCode); request.setAttribute("authenticationToken", authenticationToken); request.setAttribute("messages", messages); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.alumni.AlumniSearchDA.java
public ActionForward degreeTypePostback(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { AlumniSearchBean searchBean = reconstructBeanFromRequest(request); RenderUtils.invalidateViewState();//from w w w .ja v a2s . com request.setAttribute("searchAlumniBean", searchBean); return mapping.findForward("showAlumniList"); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.commons.student.ViewStudentApplicationDA.java
public ActionForward view(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws IOException { final Candidacy application = getDomainObject(request, "applicationOID"); request.setAttribute("candidacy", application); return mapping.findForward("view"); }
From source file:controller.EmployeeController.java
@RequestMapping(value = "/delete", method = RequestMethod.POST) public String delete(HttpServletRequest request) { int mnv = Integer.parseInt(request.getParameter("mnv")); Employee employee = new Employee(); employee.setManv(mnv);//from ww w .j ava 2 s.co m if (employee.delete() >= 2) { request.setAttribute("message", "Xa nhn vin thnh cng!"); } else { request.setAttribute("message", "Nhn vin ny hin ang qun l phng!"); } request.setAttribute("id", "delete"); return employeeManager(request); }
From source file:architecture.ee.web.community.spring.controller.FacebookController.java
private void setOutputFormat(NativeWebRequest request) { HttpServletRequest httprequest = request.getNativeRequest(HttpServletRequest.class); HttpServletResponse httpresponse = request.getNativeResponse(HttpServletResponse.class); httprequest.setAttribute("output", "json"); }
From source file:com.baomidou.framework.aop.ResubmitAspect.java
/** * <p>/*from www . j ava2s .c om*/ * ?? token * </p> */ public void generate(ProceedingJoinPoint joinPoint, HttpServletRequest request, HttpSession session, String tokenFlag) throws Throwable { String uuid = UUID.randomUUID().toString(); session.setAttribute(tokenFlag, uuid); request.setAttribute(PARAM_TOKEN, uuid); joinPoint.proceed(); }
From source file:dijalmasilva.controllers.ControladorUser.java
@RequestMapping("/otherUsers") public String listarUsuarios(HttpServletRequest req) { List<Usuario> usuarios = serviceUser.listarTodos(); req.setAttribute("todosusuarios", usuarios); return "listartodos"; }
From source file:com.sccl.attech.modules.sys.web.LoginController.java
@RequestMapping(value = "/login.ws", method = RequestMethod.GET) public String login1(String username, String password, HttpServletRequest request, HttpServletResponse response, Model model) {//from w w w.j av a2s.co m request.setAttribute("username", username); request.setAttribute("password", password); return "sysLoginPhone.jsp"; }
From source file:net.sourceforge.fenixedu.presentationTier.Action.phd.candidacy.publicProgram.PublicPhdProgramCandidacyProcessDA.java
protected void canEditPersonalInformation(final HttpServletRequest request, final Person person) { if (person.hasRole(RoleType.EMPLOYEE)) { request.setAttribute("canEditPersonalInformation", false); addWarningMessage(request, "message.employee.data.must.be.updated.in.human.resources.section"); } else if (!person.getPersonRolesSet().isEmpty() || person.getUser() != null || person.getStudent() != null) { request.setAttribute("canEditPersonalInformation", false); addWarningMessage(request, "message.existing.person.data.must.be.updated.in.academic.office"); } else {// ww w. j av a 2 s.com request.setAttribute("canEditPersonalInformation", true); } }
From source file:cn.vlabs.duckling.vwb.ui.action.SiteCreateAction.java
public ActionForward init(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException { VWBContext context = VWBContext.getContext(request); request.setAttribute("templates", VWBContext.getContainer().getTemplateService().getAllSiteTemplate()); return doCreateLayout(context); }