• 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

problem with getting result from session

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear all:
In my result.jsp page, i get my "RESULT" from my session using getAttribute("somename"). After some process in my app, i update the session in my servlet by using setAttribute("somename", some_object).
and then i called result.jsp again.
What i expected is to see some changes beacuse the session should give me the most updated result.
but what i keep seeing is the old result from the first time i load the result.jsp. In other words, result.jsp is still calling the old_result object to display the data.
My question is that how can i ensure that result.jsp is getting the most updated object from the session. thanks
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Carl,
I think your are doing something lik this :
session.setAttibute("name",YourObject);
YourObject yo = (YourObject)session.getAttribute("name");
in order to get the most recent value whith getAttribute try this :
request.setAttibute("name",YourObject);
YourObject yo = (YourObject)request.getAttribute("name");
i hope it will help you.
reply
    Bookmark Topic Watch Topic
  • New Topic