I have a web application where I take some input from the user and when the user clicks submit button, the database is queried and the results are displayed in a html page. Now, I have a new requirement where, there is a link on the page(jsp page on which user fills the details) which on clicked has to display the results which were displayed after clicking submit button previously(the most latest results) but should not query the database again. An example should make it clear

Lets say, the user fills the details in the page and click on submit for the first time. The result that is shown is lets say "APPLE". Now the same user comes back and clicks a link(say 'details') on the same page where he filled in details. And meanwhile, the values in the database have changed to say MANGO. Now, when the user clicks on this details link, the result page should show APPLE instead of MANGO(MANGO shud be displayed when the user clicks on submit button and not by clicking 'details' link)

How to achieve this? I dont want to use screen scraping solution. Any better appraoch??