List of usage examples for javax.servlet.http HttpServletRequest removeAttribute
public void removeAttribute(String name);
From source file:com.opencnc.controllers.RolController.java
/** * ***************************************************************************** * Obtiene el Rol//from w ww . j av a2 s . co m * ***************************************************************************** * Metodo sin desarrollo. * ***************************************************************************** * @param rolID * @param request * @param response * @return * @throws Exception */ @RequestMapping("/rol/obtenerRol") public ModelAndView obtenerRol(int rolID, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession sess = request.getSession(); if (sess != null) { return null; } else { request.removeAttribute("usuario"); return new ModelAndView("redirect:/usuario/login.htm"); } }
From source file:com.opencnc.controllers.ProgramaController.java
/** * ***************************************************************************** * Obtiene los programas de los usuarios. * ***************************************************************************** * Metodo sin desarrollo.//from ww w. jav a 2s . co m * ***************************************************************************** * @param programaID * @param request * @param response * @return * @throws Exception */ @RequestMapping("/programa/obtenerPrograma") public ModelAndView obtenerPrograma(int programaID, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession sess = request.getSession(); if (sess != null) { return null; } else { request.removeAttribute("usuario"); return new ModelAndView("redirect:/usuario/login.htm"); } }
From source file:com.opencnc.controllers.ProgramaController.java
/** * ***************************************************************************** * Obtiene programas por modelo//ww w . j a v a 2 s . c o m * ***************************************************************************** * Metodo sin desarrollo. * ***************************************************************************** * @param ModeloID * @param request * @param response * @return * @throws Exception */ @RequestMapping("/programa/obtenerProgramaPorModelo") public ModelAndView obtenerProgramaPorModelo(int ModeloID, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession sess = request.getSession(); if (sess != null) { return null; } else { request.removeAttribute("usuario"); return new ModelAndView("redirect:/usuario/login.htm"); } }
From source file:org.nuxeo.ecm.platform.ui.web.download.DownloadServlet.java
protected void handleDownloadSessionBlob(HttpServletRequest req, HttpServletResponse resp, String blobId) throws IOException { Blob blob = (Blob) req.getAttribute(blobId); if (blob != null) { req.removeAttribute(blobId); } else {/*from w ww. j a v a 2s.co m*/ HttpSession session = req.getSession(false); if (session == null) { log.error("Unable to download blob " + blobId + " since the holding http session does not exist"); return; } blob = (Blob) session.getAttribute(blobId); if (blob == null) { return; } session.removeAttribute(blobId); } DownloadService downloadService = Framework.getService(DownloadService.class); downloadService.downloadBlob(req, resp, null, null, blob, null, "operation"); }
From source file:com.glaf.report.web.springmvc.MxReportTaskController.java
@RequestMapping("/chooseReport") public ModelAndView chooseReport(HttpServletRequest request, ModelMap modelMap) { RequestUtils.setRequestParameterToAttribute(request); request.removeAttribute("canSubmit"); Map<String, Object> params = RequestUtils.getParameterMap(request); String rowId = ParamUtils.getString(params, "rowId"); ReportQuery query = new ReportQuery(); List<Report> list = reportService.list(query); request.setAttribute("unselecteds", list); ReportTask reportTask = null;//from w w w. ja v a 2s .c o m if (StringUtils.isNotEmpty(rowId)) { reportTask = reportTaskService.getReportTask(rowId); request.setAttribute("reportTask", reportTask); if (StringUtils.isNotEmpty(reportTask.getReportIds())) { StringBuffer sb01 = new StringBuffer(); StringBuffer sb02 = new StringBuffer(); List<String> selecteds = new java.util.ArrayList<String>(); for (Report r : list) { if (StringUtils.contains(reportTask.getReportIds(), r.getId())) { selecteds.add(r.getId()); sb01.append(r.getId()).append(","); sb02.append(r.getSubject()).append(","); } } if (sb01.toString().endsWith(",")) { sb01.delete(sb01.length() - 1, sb01.length()); } if (sb02.toString().endsWith(",")) { sb02.delete(sb02.length() - 1, sb02.length()); } request.setAttribute("selecteds", selecteds); request.setAttribute("reportIds", sb01.toString()); request.setAttribute("reportNames", sb02.toString()); } } String x_view = ViewProperties.getString("reportTask.chooseReport"); if (StringUtils.isNotEmpty(x_view)) { return new ModelAndView(x_view, modelMap); } return new ModelAndView("/bi/reportTask/chooseReport", modelMap); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.resourceAllocationManager.ManageClassesDA.java
/** * Delete class./* w w w . j a v a 2 s. c o m*/ */ public ActionForward delete(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ContextUtils.setClassContext(request); InfoClass infoClass = (InfoClass) request.getAttribute(PresentationConstants.CLASS_VIEW); ApagarTurma.run(infoClass); request.removeAttribute(PresentationConstants.CLASS_VIEW); return listClasses(mapping, form, request, response); }
From source file:org.unitedinternet.cosmo.filters.RetryFilter.java
private Exception findFilterException(HttpServletRequest request) { Exception e = (Exception) request.getAttribute(ATTR_SERVICE_EXCEPTION); if (e == null) { return null; }//from ww w . j av a 2s . c o m if (isFilterException(e)) { // clear for retry request.removeAttribute(ATTR_SERVICE_EXCEPTION); return e; } return null; }
From source file:com.glaf.oa.traveladdress.web.springmvc.TraveladdressController.java
@RequestMapping("/edit") public ModelAndView edit(HttpServletRequest request, ModelMap modelMap) { RequestUtils.setRequestParameterToAttribute(request); request.removeAttribute("canSubmit"); Traveladdress traveladdress = traveladdressService .getTraveladdress(RequestUtils.getLong(request, "addressid")); if (traveladdress != null) { request.setAttribute("traveladdress", traveladdress); JSONObject rowJSON = traveladdress.toJsonObject(); request.setAttribute("x_json", rowJSON.toJSONString()); }//from w w w . j a v a 2s . co m String view = request.getParameter("view"); if (StringUtils.isNotEmpty(view)) { return new ModelAndView(view, modelMap); } String x_view = ViewProperties.getString("traveladdress.edit"); if (StringUtils.isNotEmpty(x_view)) { return new ModelAndView(x_view, modelMap); } return new ModelAndView("/oa/traveladdress/edit", modelMap); }
From source file:com.glaf.oa.travelpersonnel.web.springmvc.TravelpersonnelController.java
@RequestMapping("/edit") public ModelAndView edit(HttpServletRequest request, ModelMap modelMap) { RequestUtils.setRequestParameterToAttribute(request); request.removeAttribute("canSubmit"); Travelpersonnel travelpersonnel = travelpersonnelService .getTravelpersonnel(RequestUtils.getLong(request, "personnelid")); if (travelpersonnel != null) { request.setAttribute("travelpersonnel", travelpersonnel); JSONObject rowJSON = travelpersonnel.toJsonObject(); request.setAttribute("x_json", rowJSON.toJSONString()); }/* w w w . jav a 2 s . c om*/ String view = request.getParameter("view"); if (StringUtils.isNotEmpty(view)) { return new ModelAndView(view, modelMap); } String x_view = ViewProperties.getString("travelpersonnel.edit"); if (StringUtils.isNotEmpty(x_view)) { return new ModelAndView(x_view, modelMap); } return new ModelAndView("/oa/travelpersonnel/edit", modelMap); }
From source file:com.glaf.oa.paymentplan.web.springmvc.PaymentplanController.java
@RequestMapping("/edit") public ModelAndView edit(HttpServletRequest request, ModelMap modelMap) { RequestUtils.setRequestParameterToAttribute(request); request.removeAttribute("canSubmit"); Paymentplan paymentplan = paymentplanService.getPaymentplan(RequestUtils.getLong(request, "planid")); if (paymentplan != null) { request.setAttribute("paymentplan", paymentplan); JSONObject rowJSON = paymentplan.toJsonObject(); request.setAttribute("x_json", rowJSON.toJSONString()); }//from ww w .ja v a 2s.co m boolean canUpdate = false; String x_method = request.getParameter("x_method"); if (StringUtils.equals(x_method, "submit")) { } if (StringUtils.containsIgnoreCase(x_method, "update")) { if (paymentplan != null) { } } request.setAttribute("canUpdate", canUpdate); String view = request.getParameter("view"); if (StringUtils.isNotEmpty(view)) { return new ModelAndView(view, modelMap); } String x_view = ViewProperties.getString("paymentplan.edit"); if (StringUtils.isNotEmpty(x_view)) { return new ModelAndView(x_view, modelMap); } return new ModelAndView("/oa/paymentplan/edit", modelMap); }