• 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

Sessions with database

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Guys
just caught with one problem
can anyone tell me how do i solve this problem of mine.
I am devloping a program for online exams.The two problems i m facing is that if one person is answering the first question the other one on the network is getting the second one...naturally because of thread concept...but can anyone tell me how do i solve this problem....someone had told me to use implement SingleThreadModel which i did and to some extent it worked...but my requirement is to create a session...and i have very little doubt as to how to go about it....even if i create session what are the values i attach to it.....
pls help
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you use the getSession() method of HTTPRequest object to create the session, the use putValue() method of HTTPSession object.

although you might want to create a class to hold the values and add an object of that class to the session instead.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic