Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can i put something on session from javascript ?

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i submit my form from javascript, i have something on the request, is it possible to put something on session from javascript ???


Frank
 
Animesh Saxena
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think session object can be written by javascript. it's server side. If I am getting your problem right, I guess you wanna share data between client side (to ---> and server side

You can use a hidden html textbox which is populated by javascript, and when form submits you can access that textbox from your server side code.

Or use the standard querystring approach (Again a messy thing).
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Frank Jacobsen:
When i submit my form from javascript, i have something on the request, is it possible to put something on session from javascript ???


Frank


No.
That would need to be done on the server side (Servlets or JSP).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic