aspose file tools*
The moose likes Java in General and the fly likes Call javascript from Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Call javascript from Java" Watch "Call javascript from Java" New topic
Author

Call javascript from Java

sindhu sheela
Greenhorn

Joined: May 20, 2008
Posts: 26
Hai,

I want to call a javascript funtion from a java code.
Is their a way to do it?(Is their any Class to call javascript from Java).

Im working in a struts1.29 application.

Thank You
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42944
    
  68
Yes, that's possible. Java 6 introduced the javax.scripting package for running scripts written in other languages. Java 5 and earlier can use the Apache BSF library.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19790
    
  20

Check out the javax.script package.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you want to call *client*-side JavaScript, however, the answer is no, at least not directly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Call javascript from Java