• Post Reply Bookmark Topic Watch Topic
  • New Topic

Assign Javascript variable value to JSTL variable.  RSS feed

 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In my JSP file, i am having one javascript variable, this value is assigned dynamically. Now, i want to assign the value of this variable to a JSTL variable. How can we do this? Please give me your suggestions...
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you understand that JavaScript is executed on the client, while JSP and JSTL are executed on the server? This means that at no point do both JavaScript and JSP/JSTL variables exist at the same time.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP (and the JSTL within) has long-since executed by the time it gets to the browser.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66153
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this article to understand JSP basics.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!