• 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

Hidden Fields

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How session is maintained using hidden fields?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For maintaining session through hidden field, you have to maintain one hidden field.
First create a unique id on server side then set it to header(by using setHeader() method). Then you have to retrieve that id through javascript on each jsp, maintain that Id with hidden filed , send that unique id to the server with hidden filed then match it on server side, if both ids are same then server knows that the request comes from the same user.Then server fulfill the request.
But its a traditional and complected ways. You can use more smarter way to maintain the session.
Hope, this will helpful to you.Thanks.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How is he going to set a hidden field on the header?
You will need create the hidden field on your form, and use that to pass values back and forth. The values can be a unique id created by the servlet. You can search the forum, because I am sure it has been discussed a number of times.
 
reply
    Bookmark Topic Watch Topic
  • New Topic