List of usage examples for javax.servlet.http HttpServletRequest setAttribute
public void setAttribute(String name, Object o);
From source file:org.dspace.webmvc.theme.RequestThemeResolver.java
@Override public void setThemeName(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String s) {// www . j a v a2 s . c o m httpServletRequest.setAttribute(RequestThemeResolver.CURRENT_THEME, s); }
From source file:org.osmsurround.ra.utils.VersionInjector.java
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { request.setAttribute("version", appVersion); return true;/*from w ww . j a v a2 s .c o m*/ }
From source file:com.luis.controllers.HolaMundoController.java
@Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setAttribute("algo", "Vale, te digo algo"); return new ModelAndView("hola"); }
From source file:cn.vlabs.umt.ui.actions.PasswordAction.java
private ActionForward toErrorPage(ActionMapping mapping, HttpServletRequest request) { request.setAttribute("email", new UMTContext(request).getLoginInfo().getUser().getCstnetId()); return mapping.findForward("showChangePassword"); }
From source file:com.anyuan.thomweboss.controller.user.UserController.java
@RequestMapping(method = RequestMethod.GET) // ???,index public String index(HttpServletRequest req, HttpServletResponse resp) { req.setAttribute("listuser", userService.listAll()); return "users/list_user"; }
From source file:com.oddprints.servlets.EditPano.java
@GET @Produces(MediaType.TEXT_HTML)// www .j av a2 s . com public Viewable view(@Context HttpServletRequest req) { Edit edit = new Edit(); req.setAttribute("panoMode", Boolean.TRUE); // forward to normal servlet return edit.view(req); }
From source file:com.oddprints.servlets.EditPano.java
@GET @Path("/basic") @Produces(MediaType.TEXT_HTML)/*from ww w . j a va 2 s . c o m*/ public Viewable viewBasic(@Context HttpServletRequest req) { Edit edit = new Edit(); req.setAttribute("panoMode", Boolean.TRUE); // forward to normal servlet return edit.viewBasic(req); }
From source file:com.redhat.rhn.frontend.taglibs.list.collection.WebList.java
protected void setupDataSet() { List dataSet = getResult();/*from ww w . ja v a 2 s . co m*/ HttpServletRequest request = context.getRequest(); request.setAttribute(getDataSetName(), dataSet); if (!StringUtils.isBlank(getListName()) && dataSet instanceof DataResult) { DataResult data = (DataResult) dataSet; Elaborator elab = data.getElaborator(); if (elab != null) { TagHelper.bindElaboratorTo(getListName(), elab, request); } } }
From source file:com.roncoo.pay.controller.exception.WebExceptionHandler.java
/** * // ww w . j av a 2 s . c o m * <p/> * ?????? */ @ExceptionHandler({ BizException.class }) @ResponseStatus(HttpStatus.OK) public String processBizException(HttpServletRequest request, BizException e) { LOG.error("BizException", e); request.setAttribute("msg", e.getMsg()); return "common/error"; }
From source file:org.opensprout.osaf.web.interceptor.SessionAttributeNameInterceptor.java
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { request.setAttribute(SESSION_ATTR_PREFIX, request.getRequestURI()); return super.preHandle(request, response, handler); }