HTML and JavaScript have no access to server-side concepts such as session scoped variables.
If you want server-side values to be carried to the client, you must use JSP mechanisms to cause JavaScript variables to be created with the desired values.
For example, let's say that you had a session-scoped variable named
xyz whose
string value you wanted to capture in a JavaScript variable named
abc: