Announcement Announcement Module
Collapse
No announcement yet.
Velocity, AbstractWizardFormController, Cannot expose session attribute Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Velocity, AbstractWizardFormController, Cannot expose session attribute

    Just for record sake. I had problem with "Cannot expose session attribute 'xxx.forms.wizard1.WizardFormController.PAGE.wizar dForm' because of an existing model object of the same name" exception. I've found some forum threads but never with satisfying solution (for me). After some time i found that integration of Velocity with Spring isnt so seamless. In log below you can see that AbstractWizardFormController sets session attributes, and after that AbstractTemplateView trying do the same. Easiest solution is enable session attributes overriding by VelocityViewResolver:

    <property name="allowSessionOverride">
    <value>true</value>
    </property>
    Im not sure about possible side effects of this setting, time shows Ideal solution is probably some "cooperation" of AbstractTemplateView with AbstractWizardFormController. Maybe some property list with strings which tells what properties shouldnt ATV copy to session context... Some Spring insider will know better


    ....

    ok there will be no log/stack trace because of f...ing URL policy and dumb URL filter which treats packages or something as URLs

  • #2
    With Freemarker as well

    Hi,

    Same thing with freemarker, it worked by adding that property.

    Thanks.

    Comment

    Working...
    X