Results 1 to 2 of 2

Thread: SimpleFormController and Session attributes

  1. #1
    Join Date
    Dec 2008
    Posts
    4

    Default 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. #2

    Default

    Hi,

    try this:

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •