permaculture playing cards
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Invoking java class from Javascript" Watch "Invoking java class from Javascript" New topic

Invoking java class from Javascript

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492

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

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

David Newton

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

Joined: Mar 22, 2005
Posts: 42958
Just for completeness' sake, JavaScript can make use of Java classes on the client (without there being an applet). See for the details.
I agree. Here's the link:
subject: Invoking java class from Javascript
It's not a secret anymore!