Submitted by heartin on Thu, 03/26/2015 - 08:38
We have already seen basic session management in Java EE using cookies and URL rewriting. Now we will quickly see some of the remaining important topics such as SSL sessions, session life cycle, passivation and sessions in distributed applications.
Session Life Cycle
There are three stages in the life of a session
Submitted by heartin on Tue, 03/24/2015 - 10:45
In Java EE, a session between a client and server may be maintained in three different ways: cookies, url rewriting and SSL sessions. We will see both session management through cookies and URL rewriting here. In both these approaches multiple requests from the client are connected together as a session using an attribute JSESSIONID. In case of session management through cookies, a cookie with name JSESSIONID saves the JSESSIONID at client (browser) side and is sent to client every time a request is made within that session from that same client.
Submitted by heartin on Sat, 03/21/2015 - 22:50
You may use request and response wrappers to extend the functionality of request or response objects. For instance, we can provide an extra layer of buffer using a wrapper with its own internal buffer independent of the output stream supplied by the container. We can pass this to other components and once we finally verify the content, then we can write it into containers output stream and thus actually committing the response.
Submitted by heartin on Sat, 03/21/2015 - 22:01
You may use request and response wrappers to extend the functionality of request or response objects. We can pass in our custom wrapper to a RequestDispatcher forward and include, and override any default behavior. For instance, we can provide an extra layer of buffer using a wrapper with its own internal buffer independent of the output stream supplied by the container. We can pass this to other components and once we finally verify the content, then we can write it into containers output stream and thus actually committing the response.
Submitted by heartin on Sat, 03/21/2015 - 10:24
Deployment Descriptor is an XML document saved in a file called web.xml and placed in the folder WEB-INF in a web application archive. The DD is used to tell the component about the deployed components and is designed to decouple the resources and components in the application from their installation and configuration. Deployment Descriptor is mainly used to declare servlets, their initialization parameters, specify mappings between URLs and their target components, provide declarative security, specifying MIME types and configuring JSP pages and documents, etc.
Pages