replacement of history.go(-1)

i have 2 screens. in the second screent i put history.go(-1) then it comes to first screen. But if you do any operations in the first screen means selecting any option etc. if you go to second screen and if you click back button(put history.go(-1)) it is coming to 2 screens back. Means it is coming first screen without any data. Please tell me what i want to use instead of history.go(-1) in this scenario.

[415 byte] By [RaviKumar.Avulaa] at [2007-11-27 10:35:06]
# 1

you have only two screens. say first.jsp and second.jsp.

in second.jsp u have history.go(-1). right ?

then it goes to only 1 screen before(-1 - means only to previous.)

Can u be still specific so that i can try to render some help (if needed) ?

GuruSeethaa at 2007-7-28 18:33:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

> Means it is coming first screen without any data.

And what was the state of the first page when you opened it? It was empty wasn't it? So why would you expect anything different when you go back in the history of your pages?

If you want to keep the submitted data, you will need to use the session to store the data so your page can read it back. Either that or store the information in hidden inputs in your second page and then submit back to the first page.

gimbal2a at 2007-7-28 18:33:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...