File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Can i put something on session from javascript ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Can i put something on session from javascript ?" Watch "Can i put something on session from javascript ?" New topic
Author

Can i put something on session from javascript ?

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 353
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

Joined: Jan 15, 2006
Posts: 62
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).


Animesh Saxena<br /> <br />Open Source Developer
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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).


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Don't get me started about those stupid light bulbs.
 
subject: Can i put something on session from javascript ?