JAVASCRIPT: Accessing the sessionbean - how ? can it be done?
Hi,
I need to access the sessionBean from javawscript. I have trawled throughj all posts and have got no satisfactory code.
Can this be done?
I have tried for eg alert(#{sessionBean.firstName}) and get a syntax error, i assume due to # symbol. do i need to CDATA this request?
Any help, much appreciated.
Regards,
LOTI
# 1
Your problem is trying to access server side information from the client side, so that alert is never gonna work in that simple form. If you want javascript access to a sessionbean variable, that variable will have to be present in the final rendered page....meaning bring it into your page as either a visible or inviisble field and then using javascript to read that. Thats one solution?