I need to get javascript variables into my jsp logic so I can manipulate them.
<script>
var id = "test";
</script>
<%
EncryptBean rsae = new EncryptBean();
// The javascript variable is ???????
byte[] cip = rsae.setMessage(???????);
%>
I lmow this is probably simplistic for most of you but I am struggling with it.
I tried to use a session variable but it seems that javascript session and jsp session variables don't know of each other. Unless anyone has that answer as well.
2 points first you will probally get more replies if you post your message as a new thread rather than under someone elses.
second. JSP is server side so its all processed before the javascript you can send permanent values to javascript once when the page first loads. The jsp above is processed before the script tags regardless of the order in the code!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.