Re: Multiple URL mapping domains

Splash Forums PrettyFaces Users Multiple URL mapping domains Re: Multiple URL mapping domains

#22051

rafaeltc
Participant

Hello Lincoln. I did not express myself very clearly.

My application follow this scheme: http://weblogs.java.net/blog/lamineba/archive/2011/08/28/multi-templating-jsf-2-prototype.

I use a multi-templating architecture. The issue is that some templates use the pages A, B and C. And others use B, D and E.

For now, my pretty-config.xml has the mapping for A, B, C, D, and E.

The question is if there is a way to map according to the template. So I can easily throw 404 in case the user tries to access the pages D and E while using the template which has only A, B, and C.

PS.: The folder structure includes all the pages which are directly accessed by the user. And these pages include the corresponding content according to the template they belong with the tag <ui:include src=”#{bean.template}/pages/mypage.xhtml” />.

Ex.:

Templates: t1 and t2.

General pages: home.xhtml, contact.xhtml, content.xhtml

t1 pages: home.xhtml and contact.xhtml

t2 pages: home.xhtml and content.xhtml

if i have all the mapping in my pretty-config.xml and I try to access content.xhtml while I am using the template t1, I will have a blank page instead of 404. Unless if I create a filter for that, but I dont want to use a filter because it might get too big.

But I don’t think it is possible to do what I was thinking because there would be the need to switch between different config files during runtime without restarting the application.

Could you get it? It is kinda hard and confusing to explain