• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

[Struts2] losing display only(prepopulated) values of the form if the validaiton fails

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp which displays some read only information and few fields for input which are all part of the same bean/form.
When the form is submitted and the validation fails, the display only information is lost from the form. below is my code. how do i retain my form values and still display the validation errors?

Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Post your authorizedUser.jsp code completely.

2) Suggestion here you are using chain result type which is not required(if possible avoid using chain). Instead you can prepare interceptor for populating data.
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I use prepareinterceptor, would it be called automatically, everytime, my submit is called? along with validation xml? Can you help me with an example to implement prepare in this scenario. Below is the jsp.

Then YOU must do the pig's work! Read this tiny ad. READ IT!
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic