How to put data in view scope via EL in JSF page
问题 In my JSF page this works: ${requestScope.put('test', 'data')} ${requestScope.get('test')} This causes exception: ${viewScope.put('test', 'data')} ${viewScope.get('test')} Exception: java.lang.NullPointerException javax.el.BeanELResolver.invoke(BeanELResolver.java:159) javax.el.CompositeELResolver.invoke(CompositeELResolver.java:84) org.apache.el.parser.AstValue.getValue(AstValue.java:157) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) com.sun.faces.facelets.el