wood burning stoves 2.0*
The moose likes JSF and the fly likes jsf application with two different start page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf application with two different start page" Watch "jsf application with two different start page" New topic

jsf application with two different start page

D. Formenton
Ranch Hand

Joined: Mar 20, 2008
Posts: 47

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.

Thank you.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950

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.
D. Formenton
Ranch Hand

Joined: Mar 20, 2008
Posts: 47
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.

Again thank you.

I agree. Here's the link: http://aspose.com/file-tools
subject: jsf application with two different start page
Similar Threads
Session gets destroyed when invoking application of another server in a same browser
how to write text into Gmail Message Body by other browser
Navigation accross two different web application!!
How to design ?
problem in login-config..