I'm trying to pass a parameter value from a servlet into a JavaScript function. Here's my Java code:
double nota = rs1.getDouble(1);
request.setAttribute("nota",nota);
This is how I am attempting to call it in the JavaScript code:
<script>
rate (${nota})
</script>
However, I'm encountering the following error message:
Multiple annotations found at this line:
- Syntax error on tokens, delete these
tokens
- Syntax error on token(s), misplaced
construct(s)
Can someone please assist me with this issue? I'm new to working with JavaScript. Thank you.