[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

value is disappearing in struts

Hi
i am developing an application using struts framework

i have  2 inputs. I am doing server side validation. when it is thrwoing validation  errors the value is disappering. what can be done to avoid this. i need to display the value  even after throwing the error

0
newbiejava
Asked:
newbiejava
  • 2
1 Solution
 
anilallewarCommented:
You can put the Action form onto the response before doing the validation. This will ensure that you have all the inputs in the response for use.

Alternately since the same request is forwarded to the view, the same parameter value should be available in the request even after validation error.
0
 
Gurvinder Pal SinghCommented:
try doing "redirect=false" in the action mapping

Similar problem is discussed here in this link
http://www.mail-archive.com/user@struts.apache.org/msg13318.html
http://www.opensubscriber.com/message/user@struts.apache.org/863748.html

0
 
newbiejavaAuthor Commented:
This comment has helped partially
0
 
newbiejavaAuthor Commented:
good solution
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now