{"id":946,"date":"2010-09-22T17:28:58","date_gmt":"2010-09-22T17:28:58","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=946"},"modified":"2011-11-17T15:17:22","modified_gmt":"2011-11-17T15:17:22","slug":"simple-primefaces-jsf-app-displayed-blank-page-incorrect-glassfish-deployment","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=946","title":{"rendered":"Simple Primefaces JSF app displays blank page &ndash; incorrect glassfish deployment"},"content":{"rendered":"<p>I recreated a new simple JSF application from scratch, in the end making it identical to an existing one that worked.<br \/>\nEach time I ran it on Glassfish 3.0.1 from Eclipse, it displayed a blank page as if not being sent to the faces servlet.<br \/>\nI checked every detail in making the apps identical \u2013 checking every configuration file and the xhtml page.<br \/>\nI cleaned and republished to Glassfish, but still no joy.<\/p>\n<p>In the end I did a detailed examination of the deployment folders under the Glassfish domain (Eclipse deploys its apps under <em>domain1\\eclipseApps\\<\/em> assuming you are using the default domain of <em>domain1).<\/em> I discovered that the Primefaces jar, <em>primefaces-2.2M1.jar <\/em>had not been deployed, even though the library was added and the web deployment assembly page had an entry for it.<\/p>\n<p>I tried explicitly removing the app from Glassfish by using the <em>Add and Remove\u2026<\/em> option on Eclipse\u2019s server context menu for the Glassfish server, and then adding it back. This time, the deployment folders were correct and the library was deployed correctly. The application then ran correctly and displayed the page.<\/p>\n<p>The lesson from this is that deployment to Glassfish 3.0.1 from Helios can be flakey, and just using a <em>clean<\/em> in Eclipse is not always enough to really clean out any issues. Removing the app and re-adding may be needed. If there is any strange behaviour, the deployment folders under the Glassfish domain should be examined early on to check that everything did in fact deploy \u2013 sometimes Eclipse will say it is all \u2018synchronised\u2019 when it may not be, and you will not always get smoking gun errors to lead you to the problem!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recreated a new simple JSF application from scratch, in the end making it identical to an existing one that worked. Each time I ran it on Glassfish 3.0.1 from Eclipse, it displayed a blank page as if not being sent to the faces servlet. I checked every detail in making the apps identical \u2013 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[13,9,10,40,184,112],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/946"}],"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=946"}],"version-history":[{"count":6,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/946\/revisions"}],"predecessor-version":[{"id":1615,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/946\/revisions\/1615"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}