• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is there any other possibility to retain data other than session

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ???
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Manjush Manjush
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

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.
 
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You seem to be mixing things up. First you say tabs, which is client side, then you say session, which is server side. Are you talking about saving data on the client side or server side?
 
Manjush Manjush
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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

Robert ,

i am looking for both Client and server side an alternative to session and request objects in storing data.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Manjush Manjush wrote:i am looking for both Client and server side an alternative to session and request objects in storing data.



Why? Session and request objects work perfectly well for that.
 
Manjush Manjush
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

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

 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic