DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   JSP (http://www.daniweb.com/forums/forum24.html)
-   -   javascript variable in jsp session (http://www.daniweb.com/forums/thread31211.html)

muktidaniweb Aug 26th, 2005 10:22 am
javascript variable in jsp session
 
How can I store a javascript variable in jsp session

hooknc Aug 26th, 2005 2:01 pm
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

tirupati_dand Sep 27th, 2005 2:05 am
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.

hooknc Oct 3rd, 2005 3:27 pm
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


All times are GMT -4. The time now is 8:21 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC