• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

jsf application with two different start page

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.

Domenico
 
Saloon Keeper
Posts: 28713
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
D. Formenton
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Domenico
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic