• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Storing Intermediate Values

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSP "A" and on clicking a link in it, it should take to a new JSP "B". In "B" there will be "return back" link which takes me back to page "A". So what is the best way to store the values displayed in page "A". Right now we are using comma seperated String and we are putting that string in to the session and retrieving back to values. Is it the right way for doing it? should i use Map to store intermediate values?
 
Greenhorn
Posts: 26
MySQL Database Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seriously, I didn't get it. Can you please reframe the question. Can you show us the code.
What values do you want to display?
Is it like a shopping cart?
 
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
session is ok, Map is not necessary. Use a designated object (designed to fit the data in JSP A) if the intermediate elements (means the fields) are not dynamic. Say for example, if JSP A has always user name and email ID go for an simple object. If you do not know what are the elements in A then go for a map (however, comma separator is not a good idea since it is used as separator for many other system scenarios)
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic