JHTML (Java within Hypertext Markup Language)

JHTML (Java within Hypertext Markup Language) is a standard for including a Java program as part of a Web page (a page written using the Hypertext Markup Language, or HTML). A Web site developer can write a small program using the Java programming language and insert the program within a Web page. When a user requests the page, the Web site server, observing a request for a file with the .jhtml suffix, passes the code to a special Java program designed to handle JHML. This program, called the PageCompileServlet, calls the Java compiler , which quickly compiles the code. (If the code has previously been compiled by an earlier page request, this step is unnecessary.) The code is then executed, typically modifying the contents of the Web page in some way before it is sent to the requestor.

JHTML is comparable to Microsoft's Active Server Page and to PHP in that all are approaches to modifying a Web page at the server before it is sent rather than at the client (the user's Web browser) with JavaScript. To access a database from the Web page, the Java code might use the Java Database Connectivity (JDBC) interface.

JHTML requires installing a Java compiler on the Web server. JHTML is part of JavaSoft's Java WebServer Application Program Interface.

This was last updated in April 2005

Dig Deeper on Java platform tools and technology