aspose 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 335
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Can i put something on session from javascript ?
 
Similar Threads
setting the request attributes from Javascript
servlet to servlet
scope issues?
JavaScript varible into Jsp
setting dynamic actions for a selection list?