Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

assign return value of function from javascript to variable in jsp

 
prajyot jadhav
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to assign return value of function from javascript to variable in jsp..?
or directly to the java class variable in struts..?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cannot be done.

Please read this article to understand how JSP works and why that's simply impossible.

You'll need to submit the value as a request to the server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic