Hi,

I working jsp project and here I want to some value at page load event which is returned from servlet. So please tell me how to get this value in javascript method from servlet.

Thank's

Why not use the Servlet to generate javascript code as well? If you don't want to do that, then use Servlet to generate HTML page and put the value in an HTML element value (if you define an ID to the element, it would be easier for javascript to find it using function getElementById()). Then grab the element's value using javascript.

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.