-1

I have a javascript variable. I'd like to assign the value of it to JSTL variable.

How can I achieve it?

Sagar V
  • 12,158
  • 7
  • 41
  • 68
  • JavaScript runs in the client browser; JSTL runs on the server before the page contents are transmitted to the client. – Pointy Jul 06 '17 at 12:54

1 Answers1

1

This is not possible since JavaScript is run in the client browser and JSTL in the server. Your JavaScript must send the value to a servlet, one way or another.

sjahan
  • 5,720
  • 3
  • 19
  • 42
  • He wants to assign the JavaScript value to the JSTL variable; your answer does the opposite (JSTL to JavaScript). – Pointy Jul 06 '17 at 12:53
  • Thx, i was not sure since this can work only one way... I fixed my answer. – sjahan Jul 06 '17 at 12:55