Introduction

J2EE provides not one but two technologies for creating dynamic Web page content: servlets and Java Server Pages (JSP). Historically, Java servlets came first and in fact JSP is built on top of servlet technologies. It is useful (but not entirely necessary) to know Java servlets before discussing JSP, so we will start our discussion there.

Both JSPs and servlets operate over networks, so in order to really understand how to write a Web application, you need to understand networking and HTTP. Once we have developed an understanding of the networking foundation of servlets, we focus our discussion on servlets, and explain the technology using several examples.

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.