It's not a secret anymore!
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
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
I agree. Here's the link:
subject: field value displayed wrongly
It's not a secret anymore!