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

[361 byte] By [LuckOfTheIrish] at [2007-11-26 10:54:31]
# 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?

AidanM at 2007-7-7 3:07:26 > top of Java-index,Development Tools,Java Tools...
# 2
thanks for the response aidanm.that is the train of thought i will have to take. will use hidden fields and maipulate them to bind to session bean
LuckOfTheIrish at 2007-7-7 3:07:26 > top of Java-index,Development Tools,Java Tools...