Is there any way to retain data in Struts tabs , when resultSet is in request rather than session,
When we move randomly from tabs and go for some other functionalities in one tab and move to the next tab the resultset will be lost.
Once more i like to ask, Is there any other possibility to retain data other than session ???
Welcome to the JavaRanch. I'm not sure what you mean by "Struts tabs". The most common way to preserve data between requests is to use the user session. There are a couple of other options, like writing data in hidden fields on a form or saving it to a database and requesting it in a later request.
What i mean is to store value objects,
Other than session is there any other way, In struts 2 its actually a POJO , instead of form ,so the value object stored may loose when we move to other functionalities and then come back to the functionality where we have to use this value object.
Can anyone give any other way which can go for replacement for a session to store value objects.
The possibility for loosing data is there while working with tabs ,
Imagine first in search page selecting the conditions and going for result
In result page based on ID there may be a hyperlink to get more details on that particular ID
When we click that ID Details may be shown on another page in Tab
in tab on a particular page there may be buttons to navigate to other pages too and and can come back to tab , then the values may not get displayed, possibilities of exception are there
i am looking for both Client and server side an alternative to session and request objects in storing data.
In Request the value object wont retain for long , if moved to other functionality and come back to old functionality ,then value wont be able to retain in request scope,but in Session yes it will work
but session handling will be a tedious one , when its a large application,
So like to know whether there is any other possibility other than session
I don't know what you mean by "tedious". The session is specifically designed for storing user data which persists longer than a single request, so before you start looking for alternatives you need to figure out why you're doing that. So far all I see is that you might have to do an inconvenient amount of programming -- but correct me if I misunderstand. And it seems to me you would have to do the same programming to manage the data outside of a session, only it might be more inconvenient because now you're not using a feature which is specifically designed for storing long-lived user data.
But as I said, probably I don't understand your requirements. I'm just suggesting that you should make sure that you understand them yourself before you start looking for alternatives.
I agree with Paul. The session is made for this and it's easy to do. Othere ways that I can think of to save imormation aside from the session would be to use a database or to save the information in hidden fields in the web page.
Something about .... going for a swim. With this tiny ad ...
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth