Posts Tagged ‘servlet’

JSP Servlet Session Listener tutorial example in Eclipse & Tomcat

JSP Servlet Session Listener tutorial example in Eclipse & Tomcat
Listener is one of the most popular technologies used in the J2EE web application. It is part of the Java Servlet as defined in Servlet 2.3 but they have their own specific functionalities. There are two most widely used Servlet Listener i.e. ServletContextListener and HttpSessionListener. Let us create a Servlet Listener that just counts the number of running http sessions and prints the details whenever a ... Full story

Creating & Parsing JSON data with Java Servlet/Struts/JSP

Creating & Parsing JSON data with Java Servlet/Struts/JSP
JSON (JavaScript Object Notation) is a lightweight computer data interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects). The JSON format is specified in RFC 4627 by Douglas Crockford. The official Internet media type for JSON is application/json. The JSON format is often used ... Full story

Tutorial: HTTP Session handling using Servlet Filters

Tutorial: HTTP Session handling using Servlet Filters
Following small piece of code comes handy whenever you are working for a J2EE web application in JSP/Servlet/Struts/JSF or any Servlet oriented web framework. A lot of time we have to handle session errors in such applications and redirect user to particular error page. Generally user is redirected to the login page where she can giver her credential and log in the application again. In ... Full story

Java Servlet Filter tutorial example using Eclipse & Tomcat

Java Servlet Filter tutorial example using Eclipse & Tomcat
Servlet Filters are the latest components that are added in Servlet 2.3 specifications. These filters are used basically for intercepting and modifying requests and response from server.  Consider a scenario where you want to check session from the every users request and if it is valid then only you want to let the user access the page. You can acheive this by checking sessions on ... Full story
Copyright © 2010 ViralPatel.net. All rights reserved.