This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes can we call a javaclass from a javascript function? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "can we call a javaclass from a javascript function?" Watch "can we call a javaclass from a javascript function?" New topic
Author

can we call a javaclass from a javascript function?

indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
Hi

How to call a javaclass(with main method in it) from a javascript function ??


thanks,
indu
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35252
    
    7
A "main" method only has relevance if you want to start a Java application. Is that what you want to do, or do you just want to call some Java method and have it return some result to the JavaScript code?


Android appsImageJ pluginsJava web charts
bala nannaka
Ranch Hand

Joined: Apr 02, 2007
Posts: 31
With Ajax or DWR you can call a java class (Server side component) from a javascript function.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Re: DWR... That's *sort* of true, but you're not directly calling the java class. It *looks* like you are--but you're not. The difference may only be semantic, but it's a very important distinction to make.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32708
    
    4
Moving to Javascript forum.
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
thankyou somuch for responding...
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: can we call a javaclass from a javascript function?
 
Similar Threads
calling a servlet from javascript function??
How to call JavaScript Function from jsp
jsp and javascript
JOptionPane No X11 DISPLAY error
Javascript function call