I need to define a java String in my jsp page thanks to a javascript variable, I know we can do the opposite with :
<% String str = "ok"; %>
var test="<%= str %>";
I wanted to know if something like this was possible :
var test="ok";
<% String str = %> test <% ; %>
I tried and it didn't worked but is there a way to achieve what I want ?