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

  • AbstractWizardFormController and VelocityViewResolver

    Spring 2.0.4 - I am implementing AbstractWizardFormController to handle a two page form. I am running into an issue that appears to be caused by the (in this case) VelocityViewResolver settings

    Code:
       <property name="exposeRequestAttributes">
          <value>true</value>
        </property>
        <property name="exposeSessionAttributes">
          <value>false</value>
        </property>
    The error I am finding in the application log is after formBackingObject is executed at the time the request and session attributes are added to the model. At that time in the following exception is thrown -

    javax.servlet.ServletException: Cannot expose session attribute 'com.virginmedia.sfweb.controller.impl.CreditCheck FormControllerImpl.PAGE.creditCheckFormBean' because of an existing model object of the same name
    Code:
    	
    
    javax.servlet.ServletException: Cannot expose session attribute 'com.virginmedia.sfweb.controller.impl.CreditCheckFormControllerImpl.PAGE.creditCheckFormBean' because of an existing model object of the same name
    org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:154)
    org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:247)
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1123)
    Has anyone run into similar issues? I am straitened by the fact that I am adding locally to an already sizeable codebase and cannot safely change the two properties referenced above (which I am not fond of at all - rather like providing the front end with a vast bucket of data and asking it to help itself) without running the risk of breaking the application elsewhere. This is a codebase that is maintained elsewhere.

  • #2
    Apologies

    I posted incorrect settings for the exposeSessionAttributes params this should have read
    Code:
        <property name="exposeRequestAttributes">
          <value>true</value>
        </property>
        <property name="exposeSessionAttributes">
          <value>true</value>
        </property>

    Comment

    Working...
    X