Java Reference
In-Depth Information
DAY 21:
Writing Java Servlets
and Java Server Pages
The last subject to be explored is one of the most exciting and dynamic
areas in Java: the use of a web server as a platform for application devel-
opment.
The Java language has moved beyond applications that run on your com-
puter and applets that run on a web page. Servlets , web applications run
by a server over the Internet and presented by a web browser, employ
Java with all the features of the language.
Using servlets, you can collect input from users through web page forms,
present records from a database or another source, and create web
pages dynamically.
This approach can be enhanced by Java Server Pages (JSP), a way to cre-
ate web pages that mix static Hypertext Markup Language (HTML) with
the output of servlets and Java expressions.
JSP enables nonprogrammers to work on websites developed with Java.
Today you learn about each of the following topics:
How servlets differ from applications and applets
n
How to run servlets as part of the Apache web server and other
servers
n
How to receive data from a web page form
n
How to store and retrieve cookies
n
How to use servlets to dynamically generate web content
n
How to develop web applications using JSP
n
How to use Java variables, expressions, and statements on a
page
n
 
Search WWH ::




Custom Search