This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes field value displayed wrongly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "field value displayed wrongly" Watch "field value displayed wrongly" New topic

field value displayed wrongly

Gunaselan Varathan
Ranch Hand

Joined: Nov 11, 2005
Posts: 30
I have two jsp pages with different form bean.

on first jsp page & second jsp page, i have text field called "LastName".

on first jsp page user enteres data on last name and pressed cancel . the user is navigated to second jsp page which has also a field called "lastName".

The problem is what ever value i enter on first jsp page lastname field is appearing on second jsp lastname field.

note: the lastname field is a textbox

Guna<br />SCJP 1.4 86<br />SCWCD 1.4 94
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Are they both refering to the same ActionForm??
Secondly, i dont know if you have used isCancelled() in ActionClass when you press the cancel button . If yes then try clearing the value of the "lastName" explicitly in that.
If no, then please post the code so that we all here may have a look at that.
[ April 05, 2007: Message edited by: RoshaniG Gopal ]

Regards,<br />Roshani
It is sorta covered in the JavaRanch Style Guide.
subject: field value displayed wrongly