Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can Javascript variable store into JSP variable

 
Chua Keng Guan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it possible to put Javascript variable into JSP variable?
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, this is a frequent misconception and I had wondered the same thing back when I first started with jsp. Simply put, javascript is a client-side technology, so it executes on the client machine, while jsp is server-side, and executes on the server. So you see, there is no way to bridge the divide between javascript and jsp unless you make a trip to the server.

Cannot do this:



You can do this:

[ November 20, 2006: Message edited by: Jeffrey Hunter ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps this article might be helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic