Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

using history.go(-1) on servlet page

 
Abhishekshri Shrivastava
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi,

please tell me how can i use "history.go(-1)" on servlet..

or
how can i come back to the same jsp from which request was sent to the servlet. i do also want to retain the all html element control value as it was.
i have to use history.go() only.
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4313
233
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Is this the same question as this one ?

There are two ways to get that done: One is using JavaScript functions as you proposed. The other way is dispatching the request to the initiating jsp, and filling 'value' attributes. The instructions for that is mentioned in the above mentioned topic.
 
Abhishekshri Shrivastava
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Report post to moderator
yes the ultimate aim of both the questions is same to the retain all old value on jsp.
now i am bit able to do the thing in following way:
as i am not permitted to add anything on old jsp. so i am using an intermidiate jsp. i will forward request to intermediate jsp and will have a page onload event (java script function) to do
window.history.go(-1);
it's working fine.
only hting i need to check wheather can i show any new message using a session variable on old jsp.
i am going through it.
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4313
233
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
Abhishekshri Shrivastava wrote:yes the ultimate aim of both the questions is same....

I'm locking this one - let's continue the discussion in your other topic. If you find any issue with your JavaScript approach, please start a specific topic on Html/JavaScripts forum.
 
    Bookmark Topic Watch Topic
  • New Topic