This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes How to call the java code from Html Files Not Applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to call the java code from Html Files Not Applets" Watch "How to call the java code from Html Files Not Applets" New topic
Author

How to call the java code from Html Files Not Applets

nani waris
Greenhorn

Joined: Dec 02, 2008
Posts: 1
Hi all,
please excuse me if i am asking any stupid question as i am new to java.
my requirement is to call a java code from the HTML file (not JSP File),in java if there is any exception im throwing specific message and the same message should be displayed as an alert in html file how this can be done.i have tried with applets but im not able to do it.
please help me.

Regards,
nani
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
Welcome to JavaRanch.

The only way to run Java in a web page is by using applets. HTML -which is static markup, not a programming language- can't call Java code.

You can learn all about applets in the Sun Java Tutorial.

If you think applets aren't right for you, tell us what exactly you are trying to do that involves "calling Java code from HTML". (I didn't understand the part about exceptions.)


Ping & DNS - my free Android networking tools app
 
Don't get me started about those stupid light bulbs.
 
subject: How to call the java code from Html Files Not Applets
 
Similar Threads
Calling Java method from Javascript
can we call a java application which contains main() from Html file with out using ap
Viewing html file using J2ME
Need a help on developing multicolored textarea for chat application
jsp