Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"/>

Our bean:

<bean id="LoginMgr" name="LoginMgr" class="">

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.

share|improve this question

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.