I’m having a little bit of a problem here, whenever I use an action attribute (i.e. <h:commandButton action="/test/test2.whatever" value="Test"/>) jsf changes the extension to .jsf and then redirects me there. So if I press the aforementioned button it would redirect me to /test/test2.jsf. Is this the default behavour and can I change it so only for example files with .xhtml would be changed to .jsf (to be honest this is my first JSF project and the configuration was done by my teammate who’s on vacation).
I’m having a little bit of a problem here, whenever I use an action
Share
actionshould return a string that will be used by theNavigationHandlerto decide the next page to render. These navigation rules are defined in thefaces-config.xmlfile, located normally under/WEB-INF.Besides, there is a
context-paramin the fileweb.xmldefining what is the default extension of JSF files. I.e.So probably yours is defined to be
.jsfand that’s why JSF is changing your.whateverto.jsfMy recomendation is that you shouldn’t decide navigation rules inside the
actionparameter. Instead you should define them through thefaces-config.xmlfile. I.e: