66
rated 0 times
[
70]
[
4]
/ answers: 1 / hits: 101122
/ 11 Years ago, fri, august 2, 2013, 12:00:00
I am setting session variable in servlet and want to access that variable in javascript.
ps = con.prepareStatement(select * from USERDETAILS where username=? and password=?);
ps.setString(1, username);
session.setAttribute(userName, username);
I tried these in javascript function. but it wasn't working...
var name = ${userName};
var name = '<%= Session[userName] %>';
More From » java