User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 373,540 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,810 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 20961 | Replies: 3
Reply
Join Date: Jul 2005
Posts: 11
Reputation: muktidaniweb is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
muktidaniweb muktidaniweb is offline Offline
Newbie Poster

javascript variable in jsp session

  #1  
Aug 26th, 2005
How can I store a javascript variable in jsp session
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Socialist Republic of Boulder
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 5
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: javascript variable in jsp session

  #2  
Aug 26th, 2005
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
Reply With Quote  
Join Date: Sep 2005
Posts: 2
Reputation: tirupati_dand is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tirupati_dand tirupati_dand is offline Offline
Newbie Poster

Re: javascript variable in jsp session

  #3  
Sep 27th, 2005
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.
Reply With Quote  
Join Date: Aug 2005
Location: Socialist Republic of Boulder
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 5
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: javascript variable in jsp session

  #4  
Oct 3rd, 2005
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 6:56 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC