Writing your first Java Server Page files

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
The Java Server Page introduction part discussed how the Java Server Page technology eases the development and maintenance of web pages containing dynamic content. In the Java Web Server, Java Server Pages are compiled to servIets.

As a result, they have all the benefits associated with Java servIets: platform independence, standard API, network capabilities (can be used with RMI or JDBQ, faster than CGI, and reusable. In addition, JavaServer Pages have the following benefits: they allow separation of content generation (logic) from content presentation and they leverage reusable components (such as JavaBeans components).

Like Servlets, JavaServer Pages can be as simple or as complex as your needs require ¬a Hello World demonstration or a multi tier web application. The following document discusses steps needed to create a Java Server Page.

Write the JSP f i le.
a. Declare any JavaBeans components.
b. Use tag centric syntax to access Bean properties or scripting centric syntax to provide desired functionality,
c. Save the file with a jsp filename extension.

• Place the JSP file and any associated files. 1. Place the jsp files under your doc root directory (/public html by default).
2. Place associated class, Jar, or ser files in a directory on your CLASSPATH (/classes by default).
• Test the JSP file.
Invoke the JSP file from a web browser.
Each of these steps are explained in detail in the following chapters..

<html>
<title>Hello</title>
<head>
<body>
<h1>
<%
out.println("Hello friends **Welcome to JSP World");
%>
</h1>
</body>
</html>



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.