List of usage examples for javax.servlet.http HttpServletRequest setAttribute
public void setAttribute(String name, Object o);
From source file:gov.nih.nci.cabig.caaers.web.admin.ImportAjaxFacade.java
private ImportCommand getImportCommand(final HttpServletRequest request) { ImportCommand importCommand = getImportCommandFromSession(request); request.setAttribute(AbstractFormController.DEFAULT_COMMAND_NAME, importCommand); return importCommand; }
From source file:org.jboss.console.plugins.monitor.ManageSnapshotServlet.java
protected void error(String msg, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setAttribute("error", "Error: " + msg); req.getRequestDispatcher("/manageSnapshot.jsp").forward(req, resp); return;/* ww w . ja v a 2 s . c om*/ }
From source file:net.sourceforge.fenixedu.presentationTier.Action.library.ManageCapacityAndLockersDA.java
public ActionForward handleInvalidCapacityOrLockers(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { LibraryInformation libraryInformation = getRenderedObject("libraryUpdate"); request.setAttribute("libraryInformation", libraryInformation); request.setAttribute("libraryUpdate", libraryInformation); return mapping.findForward("libraryUpdateCapacityAndLockers"); }
From source file:com.google.publicalerts.cap.validator.CapValidatorServlet.java
private void render(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setAttribute("analyticsId", System.getProperty(ValidatorUtil.GOOGLE_ANALYTICS_ID)); resp.setCharacterEncoding("UTF-8"); resp.setContentType("text/html"); ValidatorUtil.addNoCachableHeaders(resp); resp.setStatus(HttpServletResponse.SC_OK); req.getRequestDispatcher("/validator.jsp").include(req, resp); }
From source file:com.look.CreateUserServlet.java
/** * Stops adding user and forwards error message with request back to user * @param request/*from www . ja va2 s. c om*/ * @param response * @param message */ private void stop(HttpServletRequest request, HttpServletResponse response, String message) { stop = true; request.setAttribute("message", message); try { request.getRequestDispatcher("/createAccount.jsp").forward(request, response); } catch (IOException | ServletException ex) { Logger.getLogger(CreateUserServlet.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:net.sourceforge.fenixedu.presentationTier.Action.credits.ManageCreditsNotes.java
public ActionForward cancel(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm dynaActionForm = (DynaActionForm) actionForm; request.setAttribute("teacherId", dynaActionForm.get("teacherId")); request.setAttribute("executionPeriodId", dynaActionForm.get("executionPeriodId")); return mapping.findForward("edit-note"); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.manager.enrolments.CurriculumLineLogsDA.java
@EntryPoint public ActionForward prepareViewCurriculumLineLogs(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { request.setAttribute("bean", new SearchCurriculumLineLog()); return mapping.findForward("searchCurriculumLineLogs"); }
From source file:fr.opensagres.xdocreport.document.web.UploadXDocReportServlet.java
protected void doForward(IXDocReport report, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (report != null) { request.setAttribute(XDOCREPORT_ATTR_KEY, report); }//from w ww. j a v a2s. co m request.getRequestDispatcher(LOADREPORT_JSP).forward(request, response); }
From source file:gov.nih.nci.cabig.caaers.web.admin.ImportAjaxFacade.java
private void setRequestAttributes(final HttpServletRequest request, final int index, final int listEditorIndex, final String subview) { request.setAttribute(AJAX_INDEX_PARAMETER, index); request.setAttribute(AJAX_SUBVIEW_PARAMETER, subview); request.setAttribute(AJAX_REQUEST_PARAMETER, "AJAX"); request.setAttribute("listEditorIndex", listEditorIndex); }
From source file:com.acc.storefront.controllers.pages.CheckoutController.java
@ExceptionHandler(ModelNotFoundException.class) public String handleModelNotFoundException(final ModelNotFoundException exception, final HttpServletRequest request) { request.setAttribute("message", exception.getMessage()); return FORWARD_PREFIX + "/404"; }