Announcement Announcement Module
Collapse
No announcement yet.
SimpleFormController and Session attributes Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SimpleFormController and Session attributes

    I'm leanring Spring MVC and doing a project. I'm using SimpleFormController, and couldn't find a way to get current HttpSession to add new attributes the session object. How can I access HttpSession in onSubmit()?

    Thanks in advance,

    Walker

  • #2
    Hi,

    try this:

    Code:
    	public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors)
    		throws Exception {
    
    		HttpSession session = request.getSession();
    
    		...
    	}

    Comment

    Working...
    X