944,103 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 34657
  • JSP RSS
Aug 26th, 2005
0

javascript variable in jsp session

Expand Post »
How can I store a javascript variable in jsp session
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
muktidaniweb is offline Offline
11 posts
since Jul 2005
Aug 26th, 2005
0

Re: javascript variable in jsp session

That variable needs to be passed to a servlet or jsp through a request to the server and then the servlet or jsp can place that variable into the session.

Regards,

Nate
Reputation Points: 11
Solved Threads: 8
Posting Whiz in Training
hooknc is offline Offline
216 posts
since Aug 2005
Sep 27th, 2005
0

Re: javascript variable in jsp session

Quote originally posted by hooknc ...
That variable needs to be passed to a servlet or jsp through a request to the server and then the servlet or jsp can place that variable into the session.

Regards,

Nate
how to pass the javascript variable in servlet or java code directly.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
tirupati_dand is offline Offline
2 posts
since Sep 2005
Oct 3rd, 2005
0

Re: javascript variable in jsp session

You can't.

The variable has to be passed as part of a request.

JavaScript is client side. JSP and Servlet are server side.

Now, you can change variables in your JavaScript with JSP or Servlets, but you can't change a variable in JSP or Servlets with JavaScript.

Regards,

Nate
Reputation Points: 11
Solved Threads: 8
Posting Whiz in Training
hooknc is offline Offline
216 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC