How do I pass Javascript variable to and JSTL?
You need to send it as a request parameter. One of the ways is populating a hidden input field.
This way you can get it in the server side as request parameter when the form is been submitted.
An alternative way is using Ajax, but that's a completely new story/answer at its own.
If you can't seem to find your previously asked questions back, head to your user profile!