Results 1 to 2 of 2

Thread: WizardFormController and exposeSession with velocity

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    11

    Default WizardFormController and exposeSession with velocity

    Hello!

    I'm not getting well with Spring...

    Here is the problem, if someone could give me a help:

    I have a login page with consist the user and then add a UserProfile in the session. As im using velocity, i need to exposeSessionAttributes=true so i can access the $session and get the user information.

    Every page must get the user information , because i store in the userProfile all the menu the user can access.

    Now i have a page wich im trying to user WizardFormController. But, with the exposeSessionAttribute=true, i get an exception:

    Code:
    javax.servlet.ServletException: Cannot expose session attribute 'com.mot.bzcfc.dcnpi.web.controller.NewBoxOpenController.PAGE.orderForm' because of an existing model object of the same name
    	org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:137)
    	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:928)
    	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:705)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
    	com.mot.bzcfc.dcnpi.web.dispatcher.MotDispatcherServlet.doService(MotDispatcherServlet.java:43)
    	org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:386)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:346)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I turn exposeSessionAttribute=false, and the it works perfectally, but then i cant see the session sttributes in my velocity page...



    This page is Step-by-Step information, so wizardcontrooller would help me a lot. I tryied to use other, but no clue on how do it.


    Thanks!

  2. #2
    Join Date
    Jul 2006
    Posts
    11

    Default

    Really, there is no way to do it?

    ExposeSession=true and WizardFormController does not work together?

Posting Permissions

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