Author
Servlet with Javascript
mehta soham
Greenhorn
Joined: May 27, 2009
Posts: 8
Can we able to write javascript function in Servlet ? if yes then please tell and if not then can v bind javascript code with servlet?
Regards,
Dare Devil
D. Ogranos
Ranch Hand
Joined: Feb 02, 2009
Posts: 213
No.
Servlet -> server side code
Javascript -> client side code
They simply don't mix.
Shailesh Narkhede
Ranch Hand
Joined: Jul 10, 2008
Posts: 356
Hi Soham,
Welcome to javaranch,
can you post your requirement in breif?
Thanks,
Shailesh
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
Most people think browser side only when the term JavaScript is mentioned, but JavaScript as a language can be executed on the server side.
Naturally it can only affect server side entities, NOT the client browser API.
A variety of scripting languages are supported by Java as explained in this article.
Bill
Java Resources at www.wbrogden.com
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted May 27, 2009 09:02:21
0
DWR goes a long way towards bridging the Java/JavaScript gap, but you might want to hold off on that until you're more familiar with the underlying technologies.
subject: Servlet with Javascript