Servlet Tutorials

A very simple Servlet example

This step by step Servlet tutorial provides a very simple servlet example for beginners.

The tutorial covers:

  1. How to write the servlet class.
  2. How to compile the Servlet class.
  3. How to extract the HTML form parameters from HttpServletRequest.
  4. web.xml deployment descriptor file.
  5. How to create the war (web application archive) file.
  6. How to deploy and run the sample web application in tomcat web container

J2EE web development tutorials

Step by step tutorials on web development using J2EE platform.This series of Servlet tutorials provide the learning material for begineers and intermediate J2EE developers.These are the basic Servlet tutorials which provide foundation for other Servlet and JSP tutorials.

Understanding the GenericServlet class

GenericServlet defines a generic protocol independent Servlet. GenericServlet class is the base class of HttpServlet class.

This tutorial covers following topics.

  1. How to write your own servlets that extends GenericServlet. 
  2. How to initialize the servlet by overriding init() method.
  3. How to handle requests by overriding service() method
  4. Override the destroy() method.
  5. How to access servlet intialization parameters using ServletConfig object.
  6. How to write the log to server log file.

Applet Servlet Communication Example

This tutorial explains how to send data to a servlet from an applet and receive response. Concept explained in this tutorial can also be used for applet jsp communication.

Servlet File Upload Example

This servlet file upload tutorial explains how to upload files using apache commons file upload API.

Setting up a Servlet development environment

This tutorial explains how to setup the development environment to compile, develope and deploy servlets and Java server pages (JSP).

This tutorial covers following topics
  1. How to install Java SDK on windows platform.
  2. How to install Tomcat web container on windows platform.
  3. How to set the JAVA_HOME, Path and CLASSPATH environment variables.
  4. How to start and shut down the tomcat server.

Overview of Servlet API Classes and Interfaces

This tutorial provides brief explanation of classes and interfaces of Servlet API, focusing particularly on the javax.servlet package.

The Life Cycle of a Servlet

This tutorial explains the Servlet life cycle.

Introduction to Java Servlets

This tutorial gives basic introduction to Java Servlets.

Understanding the structure of web applications

Servlet specification defines the directory structure for deployment and packaging of web applications. When developing web applications with Servlets and JSP you must follow the directory structure. This tutorial explains how to organize the directory structure. where to put the compiled servlet classes and jar files.

Introduction to web containers

Knowledge of any J2EE web container is required to develop a J2EE based web application using Servlets and JSP, this tutorial gives the introduction to the J2EE web container.

Overview of HTTP protocol

Hyper text transfer protocol (HTTP)  is commanly used to communicate with web applications. Before you start learning web application development using Servlets and Java Server Pages, you need to have the basic understanding of the HTTP protocol. Most of the time you will write servlets that processes request made over HTTP protocol.

This tutorial provides basic overview of HTTP protocol. It provides information about the most frequently used HTTP request methods GET and POST, difference between HTTP GET and HTTP POST request methods and explains query strings.

Syndicate content