I posted this in the JSF Forums, but they passed the buck and told me to post it here.
I am using Spring MVC 2.5 with JSF, and I'm running into a weird issue with the action attribute on the form tag.
My application has a URL structure similar to http://webadress.com/org/user/edit. This is setup in the following way:
I also have a simple form, similar to the following:PHP Code:<bean id="faceletsViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.faces.mvc.JsfView" />
<property name="prefix" value="/WEB-INF/pages" />
<property name="suffix" value=".xhtml" />
</bean>
The problem arises when the form is rendered to the page and the action tag is generated. Instead of posting back to the current page (/org/user/edit), it posts back to the path that the file was pulled from.PHP Code:<h:form id="someFormName">
... contents of the form ...
</h:form>
It does this...
Instead of this...PHP Code:<h:form id="someFormName" action="/WEB-INF/pages/org/user/edit" ...>
... contents of the form ...
</h:form>
Therefore, it posts to a page that is not accessible. I'm really not sure which framework is causing this or where/how to configure this.PHP Code:<h:form id="someFormName" action="/org/user/edit" ...>
... contents of the form ...
</h:form>
Any help is greatly appreciated! Thanks...


Reply With Quote
