• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

request erased after form validation error

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using struts with velocity.
To have velocity communicate with my app, I have to put my object in the request or the session.

Imagine I have a form with some text around it, that I get throw objects that are in the request.

When I validate the form, and this form is not correct, it goes back to the form. Until that everything is normal.
EXCEPT that the request properties have been erased in between.. So I have things that have disappeared on the page !!!

Of course If I put my objects in the session instead of the request I would not have that problem .... But that wouod be a dirty workaround...

Is that a normal behaviour in struts ?
Is there a workaround ?
Does it have something to do with the scope attribute in struts-config.xml ?
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found that if you are using standard HTML tags, you will have the problem you describe. However, if use only the struts-html tags, the values are re-populated.

Give it a shot.
Skim this article as well:
http://www.codefez.com/Home/tabid/36/articleType/ArticleView/articleId/69/J2EEStrategiesPartIIIbyNealFord.aspx
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic