aspose file tools*
The moose likes Servlets and the fly likes Servlet with Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet with Javascript" Watch "Servlet with Javascript" New topic
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: 214
No.

Servlet -> server side code
Javascript -> client side code

They simply don't mix.
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
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: 12806
    
    5
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
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet with Javascript