Most notable is Mojarra version 2.1.0 this version does not work on Tomcat/Jetty due to a major bug in the annotation scanner. ![]() As to compatibility, it's important to know that JSF 2.1 is targeted on Servlet 3.0 containers (Glassfish 3, Tomcat 7, JBoss AS 6, etc), while JSF 2.0 is targeted on older Servlet 2.5 containers (Glassfish 2, Tomcat 6, JBoss AS 5, etc). The difference between JSF 2.0 and JSF 2.1 is subtle. Any error/exception message examples are Mojarra 2.1.3 specific and may (slightly) differ on different versions and implementations. They should work equally good on older or newer versions or different implementations of JSF 2.x (MyFaces, for example) and/or servlet containers (Tomcat, JBoss, etc), unless explicitly otherwise mentioned. The code examples throughout the article are wherever applicable created and tested on Mojarra 2.1.3 and Glassfish 3.1.1 which are at the time of writing just the newest available. For more detail, see also the empty string madness article. Glassfish for example does not have this problem. Long, Integer, Double, Boolean, etc), because this EL parser would immediately coerce an empty string to the wrapped primitive's default value such as 0, 0.0 or false before returning the value to JSF. This will prevent that the aforementioned context parameter will fail for primitive wrapper managed bean properties (e.g. JBoss AS, WebSphere AS, etc) or at least a servletcontainer which utilizes Apache EL parser, then we also assume that you've the following startup VM argument set: .parser.COERCE_TO_ZERO=false ![]() If you're running Tomcat or a clone/fork of it (e.g. The above will prevent that model values get littered with empty strings when the enduser leaves input fields empty. ![]() We assume that you've configured JSF to interpret empty string submitted values as null by the following context parameter in web.xml: _EMPTY_STRING_SUBMITTED_VALUES_AS_NULL true We assume that you're able to create JSF forms and beans like as demonstrated in the JSF 2.0 tutorial of this blog (model, view and controller). We assume that you're familiar with JSF basics.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |