• 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

Struts ServerSide Validate

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used *.jsp?id=1000 to save some information about id.And *.jsp has a form.I used Struts ServerSide Validator.But after validate failure redirect to "input"(*.jsp).But the information about id lose.
When I use request socpe and hidden text in the jsp file.The id information aslo lose.But i don't want to use session.What should I do?Thank you!!!
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd suggest creating property named "id" on your form bean and including the tag: <html:hidden property="id" /> in your jsp.

Then create a forward action mapping (<action name="myForm" path="xyz" forward="/xyz.jsp"></action>) and call xyz.do?id=1000 instead of xyz.jsp?id=1000. This way, Struts will populate myForm with the id property before displaying the jsp, and when the jsp is submitted, the id property will be submitted along with it.
[ January 11, 2006: Message edited by: Merrill Higginson ]
 
Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic