List of usage examples for javax.servlet.http HttpServletRequest setAttribute
public void setAttribute(String name, Object o);
From source file:com.smi.travel.controller.HistoryDetailController.java
public void setResponseAttribute(HttpServletRequest request, String refNo) { int[] booksize = utilservice.getCountItemFromBooking(refNo); request.setAttribute(Bookiing_Size, booksize); Master master = utilservice.getMasterdao().getBookingFromRefno(refNo); request.setAttribute(Master, master); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.publico.SearchInquiriesResultPageDA.java
public ActionForward selectExecutionCourse(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { request.setAttribute("executionCourse", ((SearchInquiriesResultPageDTO) actionForm).getExecutionCourse()); return selectExecutionDegree(actionMapping, actionForm, request, response); }
From source file:com.flexive.faces.ContentURIMatcher.java
/** * {@inheritDoc}/*w w w .j a v a2 s . c o m*/ */ @Override public String apply(FacesContext context) { final HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest(); // store content pk found in URI request.setAttribute(REQUEST_PK, getPk()); return super.apply(context); }
From source file:com.teamexception.reseravationmaven.controller.PredefinedServicesController.java
@RequestMapping(value = "updateService", method = RequestMethod.POST) public String updateVehicleType(HttpServletRequest request) throws ClassNotFoundException, SQLException { request.setAttribute("serviceId", request.getParameter("serviceId")); return "/view/facilitator/predefinedServices/updateVehicleType"; }
From source file:com.gunjan.businessLayer.dictServlet.java
/** * Handles the HTTP <code>GET</code> method. * * @param request servlet request/*from ww w. ja va 2 s. co m*/ * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setAttribute("definitions", "No Definition Found"); System.out.println("Get Method"); processRequest(request, response); }
From source file:com.gunjan.businessLayer.dictServlet.java
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request/*from w ww. j av a2 s . co m*/ * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setAttribute("definitions", "No Definition Found"); System.out.println("Post Method"); processRequest(request, response); }
From source file:com.mockey.ui.ServiceMergeServlet.java
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setAttribute("services", Util.orderAlphabeticallyByServiceName(store.getServices())); req.setAttribute("plans", store.getServicePlans()); RequestDispatcher dispatch = req.getRequestDispatcher("service_merge.jsp"); dispatch.forward(req, resp);//from ww w . j a va 2 s. c o m }
From source file:io.muic.ooc.webapp.servlet.EditServlet.java
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String username = request.getParameter("usernameEditFirst"); request.setAttribute("username", username); RequestDispatcher rd = request.getRequestDispatcher("WEB-INF/edit.jsp"); rd.include(request, response);/*from w w w. j a va2s . co m*/ }
From source file:net.incrementalism.tooter.LogInServlet.java
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (isBlank(request.getParameter("userName"))) { request.setAttribute("error", "'User Name' must not be empty."); } else if (isBlank(request.getParameter("password"))) { request.setAttribute("error", "'Password' must not be empty."); } else {/*from ww w. j a v a2s . c o m*/ try { setCurrentUser(request, logInUser(request.getParameter("userName"), request.getParameter("password"))); response.sendRedirect("/profile"); return; } catch (LogInException e) { request.setAttribute("error", "Incorrect User Name or Password."); } } request.getRequestDispatcher("/logIn.jsp").include(request, response); }
From source file:com.glaf.core.util.RequestUtils.java
/** * ?/*from www .ja va 2 s .co m*/ * * @param request */ public static void setRequestParameterToAttribute(HttpServletRequest request) { request.setAttribute("contextPath", request.getContextPath()); Enumeration<?> enumeration = request.getParameterNames(); while (enumeration.hasMoreElements()) { String paramName = (String) enumeration.nextElement(); String paramValue = getParameter(request, paramName); if (StringUtils.isNotEmpty(paramName) && StringUtils.isNotEmpty(paramValue)) { if (request.getAttribute(paramName) != null) { continue; } else if (StringUtils.equalsIgnoreCase("method", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("action", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("actionType", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("reset", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("submit", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("button", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("cancel", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("parent", paramName)) { continue; } else if (StringUtils.equalsIgnoreCase("hasPermission", paramName)) { continue; } request.setAttribute(paramName, paramValue); } } }