Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

problem in struts

  Asked By: Lewis    Date: Apr 19    Category: Java    Views: 565
  

I got some problem in struts can you please help me.

1) in jsp iam displaying values from javabean in textboxes.(i can
change
these values)
2) when i submit with modified values , iam doing validation in
formbean.
3) When validatio fails i formbean returning to same jsp but it is
displaying old values not modified values

can you give me some hint how to do this.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Betty White     Answered On: Apr 19

see which formbean you specified in your struts.xml in failure action

 
Answer #2    Answered By: Beverly Brooks     Answered On: Apr 19

The problem  occurs because your textbox is set to show the values  of some object(i.e) that everytime the form is called to be parsed, the core of struts  seeks for the object values in a DB table or .properties file.
So you have to set another formbean or object to be read of in your struts configuration file (struts.xml) for the failure action besides the success action.
Be in touch if you've got more Qs.

 
Answer #3    Answered By: Adelfrid Fischer     Answered On: Apr 19

Just use scope="session" instead of request....
Because request always invokes the reset() method....
If u already overriding this...? if u r not overriding
go ahead change scope to session...

 
Didn't find what you were looking for? Find more on problem in struts Or get search suggestion and latest updates.




Tagged: