This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Invoking java class from Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Invoking java class from Javascript" Watch "Invoking java class from Javascript" New topic
Author

Invoking java class from Javascript

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Hi

Any way to call a java class from HTML or Java script.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
You have to post the page back to the server or make an Ajax call.

Eric
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The mechanics of doing so can be hidden using DWR, but it's still really important to know what's going on "under the hood" (behind the scenes).
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
Just for completeness' sake, JavaScript can make use of Java classes on the client (without there being an applet). See https://jdk6.dev.java.net/plugin2/liveconnect/ for the details.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invoking java class from Javascript
 
It's not a secret anymore!