In Java if we see there are lot of new frame works are coming in to the picture which are using to develop secure and high performance and easy enterprise applications like Struts,Struts2, Spring ..etc, but if you see in every java framework we can find servlet components. Servlets playing a significant role in frameworks especially in controlling mechanism, in struts we are using servlet as Frontcontroller (org.apache.struts.action.ActionServlet) ,in Spring MVC also we are using servlet as controller.
So let us have some examples in servlets and jsp technology here , and will see the new feature come up in new versions.
Basic HelloWord programs in Servlet versions.
- HelloWorld Example in Servlet 2.5 – Explains how to write simple servlet as per 2.5 version.
- ServletConfig Example in Servlet – Explains how to use ServletConfig interface in Servlet based applications
- ServletContext Example in Servlet – Explains how to use ServletContext interface in Servlet based applications.