I want to embed above code in Javascript. should return true if it is a new session or false. This function will be called on onload of body of HTML. How will I do this? If it was a pure javascript that was not a problem but I can not check session state in javascript, so I need to embed this JSP code in Javascript.
you could say <script language="javascript"> function check_session(){ <% if (session.isNew()) { %> return true; <% }else { %> return false; <% } %> } </script>