File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to use javascript in servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to use javascript in servlet?" Watch "how to use javascript in servlet?" New topic
Author

how to use javascript in servlet?

kuni patel
Greenhorn

Joined: Jun 04, 2005
Posts: 7
how to use javascript in servlet?



Plz, give me solution .......


Thanx
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You don't use Javascript in a servlet.
To a servlet, Javascript is nothing more than text (just as HTML is).


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Ben Souther:
You don't use Javascript in a servlet.
To a servlet, Javascript is nothing more than text (just as HTML is).


Quite right.
It means you can write javascript in your response like HTML. And it will get executed at client-side.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
If you're talking about executing a JavaScript script in a servlet (as opposed to executing it in the web browser), have a look at Rhino. It is a JavaScript engine written in Java, and thus embeddable into a servlet.


Ping & DNS - updated with new look and Ping home screen widget
Hetal Thakkar
Greenhorn

Joined: Jul 21, 2005
Posts: 5
[Comments removed, sorry]
[ September 26, 2005: Message edited by: David O'Meara ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

We are unable to moderate posts that are not in English.
My apologies for removing you post, please post it again.

thanks,
Dave.
 
wood burning stoves
 
subject: how to use javascript in servlet?
 
Similar Threads
How i write in a servlet response an javascript array?
using javascripts in servlet?
How to use servlet fileters?
validation in servlet for jsp form
how to use javascript in struts form?