I have a navigation-rule like this in my JSF 2 application:
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-action>#{myBean.goToMyHome1}</from-action>
<from-outcome>myHome1.xhtml</from-outcome>
<to-view-id>/myhome1/myHome1.xhtml</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
When I put an h:commandLink in myHome2.xhtml within directory myhome2 that satisfy this rule, the page myHome1.xhtml will display but there are no images on the page. Where they go?
Behind the application is Springsecurity 3 with this config:
<sec:intercept-url pattern="/myhome1/**" access="hasAnyRole('ROLE1','ROLE2')" />
<sec:intercept-url pattern="/myhome2/**" access="hasRole('ROLE2')" />
This look like as if your picture URLs are relative to the current URL path. E.g.
When you open the page by
then the image URL will effectively point to
But when you open the page by
then the image URL will effectively point to
You need to fix it accordingly. There are several ways. Use a domain-relative path
Or prepend the context name dynamically
Or just use
<h:graphicImage>which will do that automatically