Hey. I have a problem with a navigation rule in JSF 2.1. This configuration worked with JSF 1.2. The project uses several additional libraries: JSF 2.1, RichFaces 4.2, Tomahawk, Spring 3.1, urlrewrite, acegi.
The problem is this:
I open the page in the browser url: localhost: 8080 / cat1 / cat2, I see the index.xhtml page. I fill out the form and click the button, after 2 seconds I see the result on the .xhtml page, everything is fine, but the URL in the browser has a double slash. There is localhost: 8080 / cat1 / cat2 // index.xhtml instead of localhost: 8080 / cat1 / cat2 / page.xhtml.
When I try to click a link on my page. xhtml, I see that the page was not found due to a double slash in the URL.
On the page.xhtml page, I again have a count function that calls the same form of the bean method. After clicking this button, the response is ok, my url is localhost: 8080 / cat1 / cat2 / page.xhtml without a double slash. All links on the page work.
When I type in the URL: localhost: 8080 / cat1 / cat2 / index.xhtml and click on the button, I can see my page.xhtml, but the URL is localhost: 8080 / cat1 / cat2 / and all the links to the page work
I added this line:
<from-action>
but did not help
on my index.html:
<h:commandButton action="#{bean.method}" value="" styleClass="method right" tabindex="8" />
Act:
public String method() {
Rule:
<navigation-rule> <from-view-id>/cat1/cat2/*</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/cat1/cat2/page.xhtml</to-view-id> </navigation-case> </navigation-rule>
Has anyone encountered a similar problem?
source share