This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes Faces page as an index page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Faces page as an index page" Watch "Faces page as an index page" New topic
Author

Faces page as an index page

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
My application main page is JSF based.
This page is secured with JEE form authentication.
A snippet from main.faces

Now, I entered the URL in the browser:
http://host/app/main.faces
I got the authentication form, I filled it.
The container forwards the request to main.faces but nothing is displayed.
I created a phase listener to run on RESTORE_VIEW event, this listener gets the role from the request
and saves it in one of the bean properties.
And yes, the bean is session scoped.
How to overcome this?
Thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

My experience with JSF is that the "hello page" mechanism doesn't carry sufficient context to invoke a JSF page.

I suppose if I was really ambitious, I'd work out all the details, but in practice, what I do is make my hello page a plain JSP and have it do a redirect to the JSF page. This works even with the extra context rewiring that you get when using a form-based container authentication.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Faces page as an index page