This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
is it possible to configure a JSF application so that it can begin execution calling (in the address bar of browser) one of two different .xhtml pages?
I tried to put the two pages into the welcome-file-list but only the first one works.
Actually, the precise functionality is that the first resolvable resource is the one that will work. So, for example, if the welcome list includes index.html and index.jsp but no index.html file exists, the index.jsp will be used.
To select a welcome page, you must first know whom you are welcoming. Since an initial unqualified URL request doesn't have much context, this can be challenging. If you make a welcome JSP and attach some support logic to it, you can forward to another welcome page based on something like the requester's IP address or possibly a cookie value from a previous session.
Note that because the welcome page is executed by the container and not the webapp, ".xhtm' (JSF) welcome pages may not work, so in such cases, a forwarding HTML or JSP would be required even if everyone had the same welcome page.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Mar 20, 2008
Thank you Tim.
As, in my case, the two welcome pages are (and must be) totally independent, I realize that the best way to solve the problem is to create two JSF applications over the same database, instead of merge multiple logic (and independent) path in the same application.