We are initiating a Spring + Primefaces project and the first problem we have encountered concerns storing the XHTML pages into the WEB-INF folder.
When we use a faces form in a view located inside the WEB-INF folder, then the commandButton
does not execute the managed bean method.
<h:form id="loginForm">
<p:commandButton action="#{LoginMgr.doLogin()}" value="Login"/>
</h:form>
Our bean:
<bean id="LoginMgr" name="LoginMgr" class="com.tesipro.channelmanager.business.implemented.CMLoginManager">
</bean>
In fact we think the problem is that with JSF, the pages are rendered using a link to the same page as the action of the form, so if the page is located in WEB-INF it is not publicly accessible.
We know that having all our XHTML views in the web folder instead of WEB-INF actually solves the issue, but we would like to store that pages into WEB-INF.
Best Answer
Does storing it in "app/WEB-INF/view" folder help? We do have several actions defined in XHTMLs in "app/WEB-INF/view" folder. Not invoking a spring bean from there, though, but calling a web-flow action.