• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

help me understand JSF LifeCycle...

Hi Guys,

I think I missed something about JSF and Lifecycle.

I found this page.
http://www.javabeat.net/qna/487-what-is-jsf-life-cycle-and-its-phases/

What is JSF life cycle and its phases?
The series of steps followed by an application is called its life cycle. A JSF application typically follows six steps in its life.
 
   1. Restore view phase
   2. Apply request values phase
   3. Process validations phase
   4. Update model values phase
   5. Invoke application phase
   6. Render response phase


http://jsweetland.livejournal.com/3229.html

I dont have this in my faces-config.xml

<faces-config>
<lifecycle>
 <phase-listener> SessionTimeoutPhaseListener
</phase-listener>
</lifecycle>
</faces-config>


Do I need something like this??

My faces-config.xml looks like this...I have taken out most of the beans to shorten it...but this is all it has in it...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD  JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">  
 
<faces-config>
 
    <application>     
       <locale-config>
          <default-locale>en</default-locale>
       </locale-config>              
    	<message-bundle>src.myAppName.ResourcesmyAppName</message-bundle>
    	<message-bundle>resources.logs</message-bundle>
    </application>
 
 
 <managed-bean>
     <managed-bean-name>simpleLogin</managed-bean-name>
     <managed-bean-class>com.myAppName.java.jsfLogin.SimpleLogin</managed-bean-class>
     <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
 
<managed-bean>
      <managed-bean-name>simpleLoginFormBean</managed-bean-name>
      <managed-bean-class>com.myAppName.java.jsfLogin.SimpleLoginFormBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
 
 
<!-- ================ login.jsp ================ -->    
 
    
    <navigation-rule>
        <from-view-id>/login.jsp</from-view-id>
        
        <navigation-case>
            <from-outcome>success</from-outcome>
            <to-view-id>/welcome.jsf</to-view-id>
        </navigation-case>
        
         <navigation-case>
             <from-outcome>fail</from-outcome>
             <to-view-id>/loginerror.jsp</to-view-id>
         </navigation-case>  
     
     	<navigation-case>
            <from-outcome>lostPassword</from-outcome>
            <to-view-id>/lostPassword.jsf</to-view-id>
     	</navigation-case>      
          
    </navigation-rule>    
 
<!-- ================ welcome.jsp ================ -->  
 
  	<navigation-rule>
		<description>
			Welcome
		</description>
		<from-view-id>/welcome.jsp</from-view-id>
		
		<navigation-case>
			<from-outcome>go_home</from-outcome>
			<to-view-id>/welcome.jsp</to-view-id>
		</navigation-case>		
		
		<navigation-case>
			<from-outcome>success</from-outcome>
			<to-view-id>/welcome.jsp</to-view-id>
		</navigation-case>
		
		<navigation-case>
			<from-outcome>logout</from-outcome>
			<to-view-id>/loggedOut.jsp</to-view-id>
		</navigation-case>
 
	</navigation-rule>
 
<!-- ================ error.jsp ====================== -->
 
   <navigation-rule>
      <from-view-id>/error.jsp</from-view-id>
      <navigation-case>      
         <from-outcome>success</from-outcome>
         <to-view-id>/welcome.jsf</to-view-id>
      </navigation-case>
    </navigation-rule>    
			        	    			    								  				
</faces-config>

Open in new window

0
nohacks
Asked:
nohacks
1 Solution
 
nohacksAuthor Commented:
It looks like
Code:

<%@ page errorPage="/error.jsp" %>



on the jsp page was stopping it from getting to my web.xml processing.


I fixed that and now it works...no more errors in my logs...

Thanks for your help.

Phil
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now