Article
Java Servlets - Part 1
Summary and Resources for Further Reading
In this article, we learned the basics of Java Servlets -- small Java programs that run inside your Web server and process browser requests and return dynamically-generated Web pages in response. We saw how to write, compile, and deploy a simple Servlet using standard methods supported by all Servlet-enabled Web servers. Finally, we saw a slightly more complex example that displays the current time whenever it is loaded.
There's a lot more to Servlets than what we saw here! In Part 2, we'll see how to use the HttpServletRequest object to process form submissions with a Servlet. We'll also look at the HttpServletResponse object to see what else it's able to do. Finally, we'll learn a few more tricks that can be used in web.xml to fine-tune the Servlets installed on our Web server.
For a complete and thorough look at Servlets and everything they're capable of, I recommend Jason Hunter and William Crawford's excellent book, Java Servlet Programming 2nd Edition. Not only does it cover everything there is to know about Servlets with an incredible level of detail, but it does so while supporting every point with practical examples and lucid, and sometimes humorous discussion. The book also delves into many of the technologies that are built on top of the Servlets framework, such as JavaServer Pages (JSP), the Element Construction Set (ECS), and the Tea Framework.