{"id":1069,"date":"2010-11-15T11:56:24","date_gmt":"2010-11-15T11:56:24","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=1069"},"modified":"2011-07-06T15:21:40","modified_gmt":"2011-07-06T15:21:40","slug":"namespace-error-when-using-jstl-in-facelets-with-jsf-2-0","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=1069","title":{"rendered":"Namespace error when using JSTL in Facelets with JSF 2.0"},"content":{"rendered":"<p><strong><span style=\"text-decoration: underline;\">Update 6\/7\/2011<\/span><\/strong><\/p>\n<p>I hit this problem again when accidentally ignoring the Eclipse warning.<br \/>\nThis time, the problem prevented &lt;c:if&gt; tags from working correctly &#8211; the tags always tested as true. This was especially nasty as the cause did not appear related to the problem I was having. See <strong> <a href=\"http:\/\/salientsoft.co.uk\/mantis\/view.php?id=63\">this<\/a><\/strong> issue in Mantis about the problem.<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Original Post<\/span><\/strong><\/p>\n<p>I was using the following namespace declaration in order to use JSTL (<em>c:if<\/em> etc.) on a Facelets\/JSF 2.0 page, as I had done successfully previously under JSF 1.2:-<\/p>\n<p style=\"padding-left: 30px;\"><em>xmlns:c=&#8221;<\/em><em><a href=\"http:\/\/java.sun.com\/jstl\/core\">http:\/\/java.sun.com\/jstl\/core<\/a>&#8220;<\/em><\/p>\n<p>This gave rise to the following warning in Eclipse:-<\/p>\n<p><em>NLS missing message: CANNOT_FIND_FACELET_TAGLIB in: org.eclipse.jst.jsf.core.validation.internal.facelet.messages<\/em><\/p>\n<p>The namespace is incorrect, and as pointed out <a href=\"http:\/\/www.java.net\/forum\/topic\/glassfish\/glassfish-webtier\/jstl-facelets-not-working-expected-0\"><strong>here<\/strong><\/a><strong> <\/strong>(in Ryan Lubke\u2019s comment on the post) should now be:-<\/p>\n<p style=\"padding-left: 30px;\"><em>xmlns:c=&#8221;<\/em><em><a href=\"http:\/\/java.sun.com\/jsp\/jstl\/core\">http:\/\/java.sun.com\/jsp\/jstl\/core<\/a>&#8220;<\/em><\/p>\n<p>This fixed the problem. A complete listing of the namespaces for the tag libraries is also available in edition 3 of <em>Core JavaServer Faces<\/em>, at the start of Chapter 4, page 101 \u2013 (edition 2 did not have this table; it is a useful addition).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update 6\/7\/2011 I hit this problem again when accidentally ignoring the Eclipse warning. This time, the problem prevented &lt;c:if&gt; tags from working correctly &#8211; the tags always tested as true. This was especially nasty as the cause did not appear related to the problem I was having. See this issue in Mantis about the problem. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[9,76,40,184,120,16],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1069"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1069"}],"version-history":[{"count":6,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1069\/revisions"}],"predecessor-version":[{"id":1391,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1069\/revisions\/1391"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}