<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Using JavaServer Pages</TITLE>
<META NAME="author" CONTENT="Marty Hall -- hall@apl.jhu.edu">
<META NAME="keywords"
CONTENT="JSP,JavaServer Pages,servlets">
<META NAME="description"
CONTENT="A quick example of the four main JSP tags.">
<LINK REL=STYLESHEET
HREF="My-Style-Sheet.css"
TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FDF5E6" TEXT="#000000" LINK="#0000EE"
VLINK="#551A8B" ALINK="#FF0000">
<CENTER>
<TABLE BORDER=5 BGCOLOR="#EF8429">
<TR><TH CLASS="TITLE">
Using JavaServer Pages</TABLE>
</CENTER>
<P>
Some dynamic content created using various JSP mechanisms:
<UL>
<LI><B>Expression.</B><BR>
Your hostname: <%= request.getRemoteHost() %>.
<LI><B>Scriptlet.</B><BR>
<% out.println("Attached GET data: " +
request.getQueryString()); %>
<LI><B>Declaration (plus expression).</B><BR>
<%! private int accessCount = 0; %>
Accesses to page since server reboot: <%= ++accessCount %>
<LI><B>Directive (plus expression).</B><BR>
<%@ page import = "java.util.*" %>
Current date: <%= new Date() %>
</UL>
</BODY>
</HTML>
Here's a typical result:
Popular Posts
-
What Is Visual Basic and Why do I need it? Visual Basic is Easy to learn Programming language. With Visual Basic you can develop Windows bas...
-
Learning about Properties Every component (form is component for example) has properties, that determine its look and its functioning. Prope...
-
Getting Started (Continue) Look at the form with the title bar Form1. This is how your program will look like. Everything you will place on ...
-
As you may already know, the C++ Standard Library implements a powerful string class, which is very useful to handle and manipulate strings ...
-
A JSP expression is used to insert Java values directly into the output. It has the following form: <%= Java Expression %> The Java ex...
-
XML Web Services A Web Service (XML Web Service) is a unit of code that can be activated using HTTP requests. Stated another way, a Web Serv...
-
.NET is a "Software Platform". It is a language-neutral environment for developing rich .NET experiences and building applications...
-
request This is the HttpServletRequest associated with the request, and lets you look at the request parameters (via getParameter), the requ...
-
MS SQL Server or simply SQL Server is RDBMS developed by Microsoft Corp. SQL Server uses a dialect of SQL called Transact-SQL (T-SQL). The S...
-
Differences Between Java and C/C++ It is no secret that the Java language is highly derived from the C and C++ languages. Because C++ is cur...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment