javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL does not work anymore since Java EE 7 / EL 3.0

Fixed with a custom resolver: faces-config.xml: <application> <el-resolver>my.package.EmptyNullStringResolver</el-resolver> </application> EmptyNullStringResolver.java: /** * @author pg */ public class EmptyNullStringResolver extends ELResolver { @Override public Class<?> getCommonPropertyType(ELContext context, Object base) { return String.class; } @Override public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) { return null; } @Override public Class<?> getType(ELContext context, Object base, Object property) { return null; … Read more

Notify only specific user(s) through WebSockets, when something is modified in the database

Session? Since it is available when the first handshake request is made, any attribute set to that session afterwards will not be available in the server endpoint i.e. in other words, any session attribute set after a handshake is established will not be available It seems that you got bitten by the ambiguity of the … Read more

Accessing HttpSession from HttpServletRequest in a Web Socket @ServerEndpoint

Update (November 2016): The information provided in this answer is for the JSR356 spec, individual implementations of the spec may vary outside of this information. Other suggestions found in comments and other answers are all implementation specific behaviors outside of the JSR356 spec. If the suggestions in here are causing you problems, upgrade your various … Read more

What is WEB-INF used for in a Java EE web application?

The Servlet 2.4 specification says this about WEB-INF (page 70): A special directory exists within the application hierarchy named WEB-INF. This directory contains all things related to the application that aren’t in the document root of the application. The WEB-INF node is not part of the public document tree of the application. No file contained … Read more