IntelliJ Java IDE
The moose likes Struts and the fly likes Caching the data for errors Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "Caching the data for errors" Watch "Caching the data for errors" New topic
Author

Caching the data for errors

sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi

I have a problem how shall I achieve this with out storing the data in session scope���Through my action I will retrieve some data form DB and come to a jsp and display the results(These results are in request scope) and in this page I have a button for performing different action .i want to handle the errors and its must to show the errors back to the same page from where he has clicked that button.

In my action I will add an ActionError and I will say return new ActionForward(mapping.getInput()) to throw back to the same page but the Data (which I display earlier wont be there) �������how can I persist this with out storing the earlier data in session

And is there any way of caching the data in that jsp���������

Regards
Sreenath N
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4695

If you want to cache data in a jsp, your only option is with hidden input fields. JSPs are just dynamic html pages.

Otherwise you have to store it in session or make a second DB call for the second request.


A good workman is known by his tools.
 
 
subject: Caching the data for errors
 
Threads others viewed
struts 2 Clicking on back button shows Webpage has expired
JSP/form/servlet - session persistence ?
Refresh in browser
Doubt in Setting the session scope as Application
Form Action
IntelliJ Java IDE