The moose likes Struts and the fly likes Retain search results Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Retain search results" Watch "Retain search results" New topic

Retain search results

Jaffer Shareef

Joined: Jun 27, 2008
Posts: 4
I have a search page where i can select some criteria, say Name: xxx and click on search which gives multiple results.
I select one of the record from search results and go to an other page.
If I come back to search page, previous search results and sorting order is cleared. How can i retain my previous search results and sorting order?

Please advise me a best solution in Struts or Jsp...

Thanks in Advance

- Jaffer.
rahul khanna
Ranch Hand

Joined: Sep 14, 2005
Posts: 48
When you display the results for the first time . .what are you using? A bean I guess.. Keep the bean in the session and it would then dispaly the results in the same order once again ..

Remember to clear the bean from the session .. once it is no longer required.
I agree. Here's the link:
subject: Retain search results
It's not a secret anymore!