This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 41155
    
  45
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 - my free Android networking tools app
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use javascript in servlet?
 
Similar Threads
How i write in a servlet response an javascript array?
validation in servlet for jsp form
How to use servlet fileters?
using javascripts in servlet?
how to use javascript in struts form?