Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to use back button in a java code

843841Jul 18 2006 — edited Jul 24 2006
Hi all,

I have written a servlet in which i have displayed output by using out.println(). There are two such servlets. In the second servlet i have given a button to go to previous page. the code for the button is:
<input type=button value="Back" onClick="history.go(-1)">
It is working fine in most of the systems. But in some systems, when i click the button, the source code of previous page is displayed. Can anyone help me to find a solution to the problem...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2006
Added on Jul 18 2006
2 comments
188 views