Reply To: Problem with changing language while using language base in SEO urls

Splash Forums PrettyFaces Users Problem with changing language while using language base in SEO urls Reply To: Problem with changing language while using language base in SEO urls

#24340

xmapact
Participant

Christian, Lincoln, thanks for your answers.
Fixed a problem with 500 error. There was a big mess with viewParams. I was trying to use them from template but not from template client. And at the same time I was injecting values using PrettyFaces 0_o.

Now when I got it working fine with PrettyFaces disabled I’m trying to configure friendly URLs again.
What I have is this config:

    <url-mapping id="base">
        <pattern value="/#{lang}" />
    </url-mapping>

    <url-mapping id="cat" parentId="base">
        <pattern value="/#{cat}" />
        <view-id value="/faces/productCat.xhtml" />
    </url-mapping>

    <url-mapping id="details" parentId="base">
        <pattern value="/#{category}/#{OSG}" />
        <view-id value="/faces/productDetails.xhtml" />
    </url-mapping>

And I got problems with jsf.js access with this parameters. But it works just fine with this conf:

    <url-mapping id="details" parentId="base">
        <pattern value="/anyTextHere/#{category}/#{OSG}" />
        <view-id value="/faces/productDetails.xhtml" />
    </url-mapping>

Problem is that I’m getting content of /faces/productDetails.xhtml instead of jsf.js JavaScript. I’m sure that I’m doing something wrong because Google doesn’t help =) Maybe you have any idea how to solve this problem. I’ll provide any other information if it is needed.

Thank’s in advance,

Andrei.