javax.servlet.http.HttpSession provides a way to identify an user across multiple HTTP requests and to store user specified information. In other words, it provides a support of stateful communications with the stateless HTTP protocol.
For security and memory management, sessions need to be invalidated at a certain time. There are two related methods in HttpSession.
JSR 356: Java API for WebSocket provides a standard Java API for creating WebSocket Applications. The specification provides an API for...
Expression Language (EL) was first introduced as part of JSTL 1.0, was then moved JSP 2.0 and was unified with JSF 1.2 in JSP 2.1. In Java EE 7, EL is a new separate JSR, JSR 341. Many new features are introduced in EL 3.0.
This blog shows how to use new following new features of EL 3.0:
Lambda expression (section 1.20 of EL 3.0 spec)
The new operator ; to separate...
Asynchronous operation was introduced in Servlet 3.0. ServletRequest#startAsync is used to put the request into asynchronous mode. A thread need to be created implicitly or explicitly (see here for an example).
Servlet 3.1, JSR 340 includes clarifications in asynchronous area. Besides Servlet 3,1, Concurreny Utilities for Java EE 1.0, JSR 236 is introduced in Java EE 7. JSR 236 provides a...
Asynchronous operation is supported in Servlet 3.0. I have discussed startAsync in my previous blog, startAsync in Servlet 3.0. In this blog, I will discuss AsyncContext#complete. The javadoc of AsyncContext#complete has the following:
Completes the asynchronous operation that was started on the request that was used to initialze this AsyncContext, closing the response that was used to...
Servlet 3.1 Specification (JSR 340) is almost ready for the release. One of the new features is the support for protocol upgrade.
HTTP protocol upgrade was introduced in HTTP 1.1 (RFC 2616):
The Upgrade general-header allows the client to specify what additional communication protocols it supports and would like to use if the server finds it appropriate to switch protocols. The server MUST use...
Acteur - a framework for building scalable, asynchronous web applications using Netty + Guice with an interesting programming model
Server-Sent Events (SSE) support in GlassFish
Prior to Servlet 3.0, a servlet may need to wait for a long operation to complete and can cause thread starvation in web container. In Servlet 3.0, asynchronous processing is introduced to handle this situation.
There is a lot of information about asynchronous processing in Servlet 3.0. In this blog, we will take a look at two aspects of startAsync.
When will javax.servlet.AsyncListener#...
To start using Embedded GlassFish Server Open Source Edition 3.1 in your Maven project, all you need to do is to have the following configuration in your pom.xml:
<project> ... <packaging>ear |ejb|jar|rar|war</packaging> ... <build> ... <plugins> ...
Servlet 3.1 Specification (JSR 340) and Java Authorization Contract for Containers (JSR 115) MR3 are almost ready for release. Besides "*", the role-name "**" is introduced in the above two specifications.
In a nutshell, "*" means any role defined in web.xml and "**" means any authenticated user.
Prior to Servlet 3.1, web containers use proprietary mechanisms to add security-constraints for any...
Servlet 3.1 Specification (JSR 340) is almost ready for the release. Several new security features have been added in this version of Servlet specification.
In this blog, I will explain one of the security features, namely deny-uncovered-http-methods.
Let us take a look at a simple security-constraint in web.xml as follows:
<web-app xmlns="http://www.w3.org/2001/XMLSchema" ...
Servlet 3.1 was in Public Review in Janurary 2013. And it is in Proposed Final Draft now. Most of the new features are related to security.
In this following, I will highlight features since Servlet 3.1 Public Review:
add new API javax.servlet.http.Part#getSubmittedFileName
add new API javax.servlet.ServletContext#getVirtualServerNameThis API allows a JASPIC module to be registered in a Servlet...
Servlet 3.1 (JSR 340) is almost ready for the release. One of the new features is the support for non-blocking IO. ReadListener and WriteListener are introduced to allow non-blocking processing in Servlet.
Non-blocking IO can only be used in async (defined in Servlet 3.0) or the upgrade mode. We can set the async in a servlet with @WebServlet annotation.
In this blog, we will illustrate the use...
A few thoughts on how logging ought to be over at my new blog.
I have a new blog at http://timboudreau.com - and there are new NetBeans plugins for node.js, source code for the NetBeans VNC modules, plus a nifty Netty-based framework for asnchronous web apps, and more.
This is a short info on JSR 359, which just got started.
Embeddability of GlassFish is been around for quite some time now. In 3.1, the embeddable APIs have been revised. Most of the GlassFish community is already aware of the API revision, however I would like to briefly describe the revised APIs in this blog and welcome any feedback.
Embeddable API overview:
API JavaDocs are at http://embedded-glassfish.java.net/nonav/apidocs/
The APIs are briefly...
In JUG-AFRICA we started an Open Source project to manage the BIG ANNUAL EVENTS for our JUGs. The first release will be available in the early second half of January.
The application will provide a lot of services via the REST Web services.
I'll like to let you know the dates of JCertif 2011 the biggest Java Community Event in Africa. About 800+ attendees from many countries.
We will be happy to have you as Speaker on Developer Tools, Java, Open Source, Mobile Apps...or Business solutions.
Still hesitating to join JCertif 2011 ? See the past event : JCertif 2010 and this blog post