Applet-JAX and scripting

I came across Chet Hasse's blog entry titled "Applet-JAX ". In the code, he uses Java-to-Javascript Communication. If you are going to use JDK 6, then you can use scripting API (javax.script) to access browser's (native) JavaScript script engine. JSR-223 script engine for browser's JS interpreter is available at https://scripting.dev.java.net/. With JDK 6, Rhino based JSR-223 engine is included as well. There is also scriptlet applet to write applets in JavaScript.
Comments:

"use scripting API (javax.script) to access browser's (native) JavaScript script engine" . Really ? could you give some example code ? I know we can use Common DOM API or JSObject to access browser DOM ? Do you mean javax.script can do that ?

Posted by mike on November 13, 2006 at 11:55 AM IST #

Yes, you can access browser's native JS interpreter through javax.script API. This jsr-223 engine uses JSObject API. Because of that this engine can only be used inside applets. There is a simple applet in CVS [$scripting/engines/src/example/HelloScript.java]

Posted by A. Sundararajan on November 13, 2006 at 01:18 PM IST #

Sorry the file is $scripting/engines/browserjs/src/example/HelloScript.java

Posted by A. Sundararajan on November 13, 2006 at 01:20 PM IST #

Post a Comment:
Comments are closed for this entry.
About

sundararajan

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Links

No bookmarks in folder

Blogroll

No bookmarks in folder

News

No bookmarks in folder