Skip to Content
Learning Java
book

Learning Java

by Jonathan Knudsen, Patrick Niemeyer
May 2000
Beginner
726 pages
21h 42m
English
O'Reilly Media, Inc.
Content preview from Learning Java

Implementing Servlets

Now we’re going to take a leap from the client side over to the server side, to write Java applications for web servers. The Java servlet API is a framework for writing servlets, which are application components for a web server or other type of server; just as applets are application components for a web browser.

The servlet APIs live in the javax.servlet package, which is a standard Java API extension, not part of the core Java APIs. In this book we haven’t talked about many standard extension packages, but this is one is particularly important. (It should probably be a core API.) You’ll want to grab the latest Java Servlet Development Kit (JSDK) from http://java.sun.com/products/servlet.

The servlet APIs are useless without a server on which to run them, so you’ll also want to find an implementation of the servlet environment for your favorite web server: Netscape, Apache, or whatever. We won’t try to anticipate which environment you have in this book, so the details about how to install your servlets and invoke them will be up to you. But it should be pretty easy.

Why Servlets?

Why would we want to use Java on the server side, as opposed to a scripting language, such as Perl? The simplest answer to that question is: for the same reasons that you would use Java anywhere else. Servlets simply let you write in Java and derive all of the benefits of Java and the virtual machine environment on the server side. (You also have the limitations of Java.) Historically, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning Java, 4th Edition

Learning Java, 4th Edition

Patrick Niemeyer, Daniel Leuck
Learning Java, 6th Edition

Learning Java, 6th Edition

Marc Loy, Patrick Niemeyer, Daniel Leuck
Learning Java, 5th Edition

Learning Java, 5th Edition

Marc Loy, Patrick Niemeyer, Daniel Leuck
Head First Java, 2nd Edition

Head First Java, 2nd Edition

Kathy Sierra, Bert Bates

Publisher Resources

ISBN: 1565927184Catalog PageErrata