users@javaserverfaces.java.net

How the faces servlet gets a JSF-view

From: Martin Höller <martin.hoeller_at_xss.co.at>
Date: Thu, 6 Mar 2008 15:33:17 +0100

Hi!

I'm relatively new to JSF and I'm trying to find out how the JSF servlet
works behind the scenes (due to another problem I have). Please correct me
if I'm wrong.

The first phase in JSF is the "Restore View" phase which needs to build a
component tree if a page is displayed for the first time. To build this
tree the input page needs to be obtained and read.

For example if I have a URL like
http://localhost:8080/mywebapp/faces/mypage.jsp a page "mypage.jsp" has to
be read from somewhere. (I assume prefix mapping for the servlet and
default values for all other configuration parameters for now.)

How does the faces servlet read this input stream? Is it simply a file i/o?
I assume it's not, as (at least with JSF 1.1) it also works with OpenCms
that stores JSP pages in a database.

Can someone please enlighten me on this one.

many thanks,
- martin
-- 
Martin Höller                   | martin.hoeller_at_xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71