I think this is kind of off topic in a Tomcat discussion group, but I am not sure since I am not savy on the culture here.

As far as I know you cannot directly communicate from Javascript to JSP. There is a fundamental problem here and that is that a JSP page is transduced into a servlet and outputs HTML/XHTML that can contain Javascript or link to a Javascript file. Javascript is utilized by the browser, so there is no JSP per se to talk to, just HTML/XHTML to act on.

However, you could have them communicate indirectly. You could have Javascript do a submit a form with paramters and direct this to a JSP and the JSP can parse out the paramaters. If you direct the submit to the same JSP, you are in a sense passing information to the JSP.

Another mechanism that is available is that Javascript has the capability to communicate with an Applet. The Applet can open up a socket or whatever with the server it as served from and communicate this way to the server.

In addition, Javascript can write to a cookie and information can be passed to JSPs this way.

Dan

Hello Can any body tell me how to pass parmeters got from html file to javascript function and sending or assigning it to a variable defined in jsp file.
thanks in advance,
Mano


Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to