Code example for ModelAndView

Methods: getViewName

0
		 
		if(modelAndView == null) { 
			return; 
		} 
		 
        String viewName = modelAndView.getViewName(); 
        if(viewName != null && !viewName.startsWith("redirect:")) { 
            modelAndView.addAllObjects(globalRenderVariables); 
            modelAndView.addAllObjects(perRequest(request,response)); 
        } 
	} 
	 
	protected Map<String,Object> perRequest(HttpServletRequest request,HttpServletResponse response) { 
		HashMap<String,Object> model = new HashMap<String,Object>(); 
		 
		model.put("share_current_request_time", new Date()); 
		model.put("share_current_login_username", "badqiu"); 
		model.put("ctx", request.getContextPath()); 
		model.put("flash", Flash.current().getData());