{"id":745,"date":"2010-01-08T15:25:55","date_gmt":"2010-01-08T15:25:55","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=745"},"modified":"2011-11-17T13:40:24","modified_gmt":"2011-11-17T13:40:24","slug":"jsf-is-not-allowed-in-template-text","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=745","title":{"rendered":"JSF: #{&#8230;} is not allowed in template text"},"content":{"rendered":"<p>This error can occur when\u00a0loading a JSF\/Facelets page :-<\/p>\n<pre>org.apache.jasper.JasperException: \/home.jspx(16,17)\r\n   #{...} is not allowed in template text<\/pre>\n<p>One reason for this, described on JavaRanch <a title=\"http:\/\/www.coderanch.com\/t\/473437\/JSF\/java\/not-allowed-template-text\" href=\"http:\/\/www.coderanch.com\/t\/473437\/JSF\/java\/not-allowed-template-text\"><strong>here<\/strong><\/a><strong>, <\/strong>is that the JSF page is not being routed properly via the servlet mapping in web.xml. The following extract from web.xml shows a mapping for <strong>.iface<\/strong>,\u00a0to route urls ending in <strong>.iface<\/strong> to the ICEfaces Persistent Faces Servlet:-<\/p>\n<pre>    &lt;servlet-mapping&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;servlet-name&gt;Persistent Faces Servlet&lt;\/servlet-name&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;url-pattern&gt;*.iface&lt;\/url-pattern&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/servlet-mapping&gt;<\/pre>\n<pre><\/pre>\n<p>Even though the page itself may be a <strong>.jspx<\/strong> file, using <strong>.jspx <\/strong>rather than <strong>.iface<\/strong> in the url would not route the page to the above servlet, causing it to be parsed incorrectly. <strong><a title=\"http:\/\/stackoverflow.com\/questions\/2386823\/tomcat-6-jsf-jsp-filename-configuration-problem\" href=\"http:\/\/stackoverflow.com\/questions\/2386823\/tomcat-6-jsf-jsp-filename-configuration-problem\">This<\/a> <\/strong>post describes the cause in more detail &#8211; the #{&#8230;} syntax is unified EL, which is not allowed in template text in a JSP\u00a0(hence the error). In the above case the page was being treated as a JSP rather than a Facelet due to the incorrect routing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This error can occur when\u00a0loading a JSF\/Facelets page :- org.apache.jasper.JasperException: \/home.jspx(16,17) #{&#8230;} is not allowed in template text One reason for this, described on JavaRanch here, is that the JSF page is not being routed properly via the servlet mapping in web.xml. The following extract from web.xml shows a mapping for .iface,\u00a0to route urls ending [&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":[76,40,184,183,21,16],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/745"}],"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=745"}],"version-history":[{"count":6,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/745\/revisions"}],"predecessor-version":[{"id":747,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/745\/revisions\/747"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}