Deployment Descriptor in Different Servlet Versions

java-jee

In this tutorial I will post the list of web.xml file used in the previous versions of servlet. This will help you to understand the evolution of servlet configuration file and the latest improvements. New Features in Servlet 3.0 What is load on startup element in web.xml file 1. Servlet 2.3 This version uses the […]

Asynchronous Servlet – A new feature in Servlet 3.0 and Java EE 6

java-jee

When Java EE 6 was announced with a new servlet specification i.e Servlet 3.0 – Asynchronous servlet was a very important feature added to the new specification. Suppose your servlet does a long running task like making a JDBC call or invoking a web service, such operations generally take up a lot of CPU time […]

What is load on startup element in web.xml file

specify the order in which we want to initialize various Servlets. Like first initialize Servlet1 then Servlet2 and so on. This is accomplished by specifying a numeric value for the  <load-on-startup> tag. <load-on-startup> tag specifies that the servlet should be loaded automatically when the web application is started. The value is a single positive integer, […]

ServletContextListener Example

java-ee-thumbnail

This tips explains the how to use ServletContextListener. There will be only one ServletContext for each web application. ServletContext will be created while deploying the application. Once the ServletContext is created, it will be used by all the servlets and jsp files in the same application. ServletContext is also called as the application scope variables […]

load-on-startup element in web.xml

java-ee-thumbnail

This tips explains the few points on how to use the load-on-startup element on the web.xml file. Whenever is starting, it is possible to tell the container to load a servlet on the startup. You can load any number of servlets on the startup. Normally this is done for any initialization purpose. Look into the […]

Servlets Interview Questions

1) Is it the “servlets” directory or the “servlet” directory? For Java Web Server: on the file system, it’s “servlets” c:\JavaWebServer1.1\servlets\DateServlet.class in a URL path, it’s “servlet” http://www.stinky.com/servlet/DateServlet 2) How do I support both GET and POST protocol from the same Servlet? The easy way is, just support POST, then have your doGet method call […]

New Features in Servlets 2.5

java-ee-thumbnail

1.Introduction This article presents new features introduced in the Servlet 2.5. Servlet 2.5 is bundled with Java EE 5.0 edition and it has lot of new features. This version has major changes since it has to support the Java 5.0 version for all the J2EE technologies. One of the notable changes will be supporting Generics […]

New Features in Servlets 3.0

java-ee-thumbnail

Introduction This article covers most of the important features available as part of Servlet 3.0 specification. Note that the Servlet 3.0 specification constantly keeps changing frequently with the reviews coming in and the features and the API’s mentioned in this article is based on the specification that is available in JCP for public review as […]

Servlet 3.0

java-ee-thumbnail

Can’t wait to see Servlet 3.0 in action. More details about the specification and the current status is available in its JSR homepage. The introduction of support for non-blocking I/O takes Java Servlets to a new level and this, in my opinion,is the most significant stride in Servlet specification since it was introduced. The benefits […]

How to delete a cookie on server in a J2EE application

java-ee-thumbnail

There is no direct method offered by servlet API to delete a cookie on server side. This is how you can go about doing it. also read: Java EE Tutorials Servlets Interview Questions New Features in Servlets 3.0 Asynchronous Servlets in Servlets 3 Loop through the cookies in the request object to locate the one […]