Basic JSP Sample : Hello World

  Contents Next

Contents

Purpose

Create an HTML page that displays the string "Hello Oracle World!"

Remarks

This simple page contains plain HTML, except for couple of the JSP directives and tags. The first one in the HelloWorld.jsp is a page directive that defines the content type and character set of the entire page. The other is the scriptlet tag that calls the Java method println to print a string to the standard output device.

Code from HelloWorld.jsp

<%@ page contentType="text/html;charset=WINDOWS-1252"%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
<META NAME="GENERATOR" CONTENT="Oracle9i JDeveloper">
<TITLE>OC4J JSP Sample - Hello Oracle World</TITLE>
</HEAD>
<BODY background="../images/Background.gif">
<P>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<B><CENTER><FONT COLOR=BLACK SIZE=5>
<TABLE BORDER BGCOLOR=BLACK>
<TR>
<TD ALIGN=CENTER VALIGN=CENTER>
<B><FONT COLOR=RED SIZE=5>
&nbsp;<% out.println(" Hello Oracle World"); %> !
</B>
</TD>
</TR>
</TABLE>
</CENTER></B>
</P>
</BODY>
</HTML>

Source Code Listings


  Contents Next
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy