I have a problem using JSF 2.0, PrimeFaces and the tuckey.org UrlRewriteFilter.
The problem is, that if i add a PrimeFaces-component (eg ), the page (or wherever exactly the resources are coming from) doesn't load the core.js where the PrimeFaces-object is defined. Accordingly, the component doesn't load.
The core.js-file is located within the primefaces-2.2.RC1.jar (which is within the WEB-INF/lib of the webapp) within the folder META-INF/resources/primefaces/core/core.js.
My urlrewrite-rules are the following:
<rule>
<from>/</from>
<to>/faces/pages/public/welcome.xhtml</to>
</rule>
<rule>
<from>/styles/**</from>
<to>/styles/$1</to>
</rule>
<rule>
<from>/images/**</from>
<to>/images/$1</to>
</rule>
<rule>
<from>/scripts/**</from>
<to>/scripts/$1</to>
</rule>
<rule>
<from>/flash/**</from>
<to>/flash/$1</to>
</rule>
<rule>
<from>/admin/*.xhtml</from>
<to>/faces/pages/admin/$1.xhtml</to>
</rule>
<rule>
<from>/*.xhtml</from>
<to>/faces/pages/public/$1.xhtml</to>
</rule>
<rule>
<from>/**</from>
<to>/$1</to>
</rule>
I guess it's a problem with my rewrite-rules, but i just can't figure out what exactly goes wrong. What i would need would be the URL that is used by PrimeFaces to load the core.js file, so i can analyze what the problems with my rules.
Has anybody an idea how to solve this problem?
Thank you all for your advices :)
Best regards, Robert
Ok i just found the answer. It was definitely no problem with the urlrewrite filter. Instead, it was just a problem with my facelet-template.
the template used head and body tags instead of the JSF versions "h:head" and "h:body" and PrimeFaces requires the "h:head" tag to be present.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.