Chapter 21: Writing Java servlets and JavaServer Pages

Learn about Java servlets and JavaServer pages -- what they are, how they work, and how to build them into your Web content.

One of the most exciting and dynamic areas of growth in Java is the use of a Web server as an application development platform. The Java language has moved beyond applications that run on your computer and applets that run on a World Wide Web page.

Servlets, Web applications run by a server over the Internet and presented by a Web browser, employ Java without the prohibitive security restrictions in place for applets. A servlet can use 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 JavaServer Pages (JSP), a way to create Web pages that mix static HTML with the output of servlets and Java expressions.

JavaServer Pages enable nonprogrammers to work on Web sites developed with Java.

In this chapter from the book SAMS Teach Yourself Java 2 in 21 Days, by Rogers Cadenhead and Laura Lemay, you'll learn about the following topics:

  • How servlets differ from applications and applets
  • How to run servlets as part of the Apache Web server and other servers
  • How to receive data from a Web page form
  • How to store and retrieve cookies
  • How to use servlets to dynamically generate Web content
  • How to create a JavaServer Page
  • How to use Java variables, expressions, and statements on a page

    Click here to download this free book chapter.

  • This was last published in October 2004

    Dig Deeper on Java for Lotus Notes Domino

    Start the conversation

    Send me notifications when other members comment.

    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

    Please create a username to comment.

    -ADS BY GOOGLE

    SearchWindowsServer

    Search400

    • iSeries tutorials

      Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

    • V6R1 upgrade planning checklist

      When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

    • Connecting multiple iSeries systems through DDM

      Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

    SearchDataCenter

    SearchExchange

    SearchContentManagement

    Close