Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic: Servlets

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


Servlets

Server-Sent Events (SSE) is part of HTML5. SSE is a simple, undirectional communication from server to browser. It allows server to push data to client once a connection is established. The entire point of SSE is to make it easy for the server to push messages to the browser, once the browser has first established a connection to the server. These messages are of the form "field: value" with...
on May 21, 2014
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. HttpSession.invalidate() By...
on Aug 29, 2013
WebSocket is a bi-directional, full-duplex, TCP based messaging protocol. It is originally proposed as part of HTML5 and is a IETF-defined Protocol (RFC 6455). And W3C has defined JavaScript API for WebSocket which is in candidate recommendation since 2012-09-20. JSR 356: Java API for WebSocket provides a standard Java API for creating WebSocket Applications. The specification provides an API for...
on Aug 7, 2013
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: Standalone environment Lambda expression (section 1.20 of EL 3.0 spec) The new operator ; to separate...
on Jul 1, 2013
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...
on Jun 6, 2013
Update: In Servlet 3.0, the behavior of using response is undefined after invoking #complete or #dispatch. In Servlet 3.1, it is clarified that AsyncContext#getResponse will throw IllegalStateException. The blog has been updated for this. 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...
on May 14, 2013
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...
on May 7, 2013
Have you wanted to do something with asynchronous I/O? I did. After doing some work with Node.js, I wanted to find a way to get some of the goodness of its programming model for Java. The Acteur project is the result - a framework for building scalable, asynchronous web applications using Netty + Guice - was the result. The programming model is a little unusual - you treat constructors as...
on Apr 7, 2013
Server-Sent Events (SSE) is part of HTML5 specifications that can be used to push notifications from a server on a HTTP connection. A developer can implement it on top of a servlet but he has to know the details of wire format. We added bit of abstraction so that a developer doesn't have to deal with the wire level details and can work on actual application. The heart of the abstraction is a...
on Apr 20, 2012
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#...
on Sep 8, 2011
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>   ...
on Mar 6, 2011

Security

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...
on Apr 19, 2013
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" ...
on Apr 19, 2013
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...
on Mar 18, 2013

JSR

Update: One should not use response in AsyncListener#onComplete. Only print debug in this example. 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...
on Apr 16, 2013

JSP

A few thoughts on how logging ought to be over at my new blog.
on Dec 5, 2012

Linux

So I haven't posted a blog here since 2009 - and haven't work for Sun or Oracle since early 2010. It's been a wild few years working on a number of things as diverse as giant clouds to control software for cameras which go down oil wells. And I have a new blog at timboudreau.com, naturally using a blog engine I wrote myself (I gave myself a project to learn node.js). Currently I'm architecting...
on Nov 10, 2012

Programming

JSR 359 has been accepted by Java SE/EE executive committee a month back. Please see the specification request for the content of this revision of SIP Servlet 2.0 specification. We have established a java.net project for cordinating and communicating the progress of the specification. The work is about to get started. At the moment, the expert group is being formed and some of the leading...
on Sep 3, 2012

Community

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...
on Mar 2, 2011
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 all services bellow via the REST Web services :     - Appointment Manager - Conference Manager - Paper reviews and approval Manager - Profile Manager - Registration Manager - Sponsorship...
on Jan 2, 2011