Kevin Yang
Kevin Yang

Reputation: 245

Is it possible for Seam url rewriting to add prefix to url?

What I need is to add an prefix (such as 'secure') for all urls which requires login, is it possible for Seam url rewriting to do this:

<page view-id="/view/*" login-required="true">
    <rewrite pattern="/{prefix}/{url}" />
</page>

<page view-id="/view/home.xhtml">
    <rewrite url="/home"/>
</page>

Upvotes: 1

Views: 290

Answers (1)

stacker
stacker

Reputation: 68962

I don't think this would work, since it is ambigious view/* matches also view/home . In a similar situation I moved all pages to view/secure and forced login on these view-ids. With an editor which supports global search/replace you can quickly change the references between pages.

Upvotes: 1

Related Questions