Hi Java People,

I have one servlet , few JAVASCRIPTS, one JSP page.

First when I login some processing is done at back in servlet and some variables are set. after login i enter into main JSP page which contains some BUTTONS. On click of every button I have some JAVASCRIPT calling. Till this stage my work is running fine...........Problem starts now........ that I want to get values in JAVASCRIPT files, which are set in Servlet...........So just tell me how to get information fron there.....

waiting for reply.........


uh, WHAT do you want?
Your rant makes no sense at all.

I have simple question.........I want to get values of variables in JAVASCRIPT file....value of those variables are set in servlet. So how to get value in SCRIPT from servlet............Do u get it now

do you have any grasp of how Servlets and JSP work, where what is executed and when?

And there's no need to be so agressive, it's not going to make people more eager to help you.

If the value has been set, use scriptlet to access your PageContext to get the value and then set it in your Javascript block.

no, you don't use scriptlets. Scriptlets are evil and are still allowed ONLY for backwards compatibility reasons.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.