Recent Articles

Servlet Read Form Data

This Servlet tutorial is to take you to the next step in learning servlets. As stated earlier in start of the servlet tutorial series, servlets are primarily meant for web applications. In this let us see how we can read html form data from a URL and process it in a servlet and then send […]
Published to Servlet Tutorial on 27/07/2014.

Servlet Hello World

This tutorial is the standard Hello World program using Java Servlet. Using an IDE is the best choice to do development. It will help to increase the productivity. If you are in the early days of learning, like in college or school then you can use a simple text editor like Notepad++. My IDE of […]
Published to Servlet Tutorial on 27/07/2014.

Servlet Getting Started

This part of the servlet tutorial is to setup the development environment required to execute Servlets. Install and Setup Java To run the Java Servlets we need a Servlet container like Apache Tomcat. Before going into detail of installing the servlet container we need to install Java and it is a prerequisite. Download the latest […]
Published to Servlet Tutorial on 27/07/2014.

Servlet Jargons

Before going through the complete Servlet tutorial, it is better to understand tech jargons related to Servlets. Following are some of the tech jargons related to Java Servlet technology, HTTP HTTP Request HTTP Response Request Methods HTTP Server Servlet Container Application Server Hyper Text Transfer Protocol (HTTP) HTTP is the corner stone of the World […]
Published to Servlet Tutorial on 27/07/2014.

What is Servlet

The Servlet is a type of Java class used in Java web applications which enhances the capabilities of a server. These Java servlets runs on a web application server container. These servlets are used to generate HTML content to be shown on the Web browser. At the lowest level it is nothing but a Java […]
Published to Servlet Tutorial on 27/07/2014.

URI And URL Difference

Before going into URL and URI, you need to know some background. Do you ever thought about, who decides what is URL? and what is URI? or who is the authority for URL, URI and such naming conventions? W3C and IETF There are two separate bodies W3C and IETF. The World Wide Web Consortium (W3C) […]
Published to Servlet Tutorial on 07/10/2009.

Session Life Cycle

When I say life cycle, I can hear you murmur “Oh no not again, how many life cycles I have to deal with”! In real world everything has life cycle, then why not in programming, after all, software is all about mimicking real life.  In a previous article I discussed about methods used for session […]
Published to Servlet Tutorial on 24/09/2009.

Servlet JSP Communication

getServletConfig().getServletContext().getRequestDispatcher(“jspfilepathtoforward”).forward(request, response); The above line is essence of the answer for “How does a servlet communicate with a JSP page?” When a servlet jsp communication is happening, it is not just about forwarding the request to a JSP from a servlet. There might be a need to transfer a string value or on object itself. […]
Published to Servlet Tutorial on 08/04/2009.

Session Tracking Methods

Following answer is applicable irrespective of the language and platform used. Before we enter into session tracking, following things should be understood. What is a session? A session is a conversation between the server and a client. A conversation consists series of continuous request and response. Why should a session be maintained? When there is […]
Published to Java Collection Tutorial on 31/05/2008.

What happens if you call destroy() from init() in java servlet?

destroy() gets executed and the initialization process continues. It is a trick question in servlets interview. In java servlet, destroy() is not supposed to be called by the programmer. But, if it is invoked, it gets executed. The implicit question is, will the servlet get destroyed? No, it will not. destroy() method is not supposed […]
Published to Servlet Tutorial on 27/05/2008.