This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 41046
    
  43
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call the java code from Html Files Not Applets
 
Similar Threads
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
Calling Java method from Javascript