File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes phaseListener not working Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "phaseListener not working" Watch "phaseListener not working" New topic
Author

phaseListener not working

Denise Smith
Ranch Hand

Joined: Jul 26, 2005
Posts: 36
Hi,

My phaselistener use to work... I migrated to a different server and now it's not working. I also can't get any servlet filters to trigger.

here is the definition in faces config:
<lifecycle>
<phase-listener>
net.ongov.arrest.resources.PhaseIndicator</phase-listener>
<phase-listener> com.ibm.faces.webapp.ValueResourcePhaseListener</phase-listener>
</lifecycle>


here is the phase listener:
/*
* Created on Jul 18, 2006
* itrjone
*
*
* Window - Preferences - Java - Code Style - Code Templates
*/
package net.ongov.arrest.resources;

//import java.sql.SQLException;


import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;



//import net.ongov.webrici.RiciFtp;
//import net.ongov.webrici.RiciPhoto;

/**
* @author itrjone
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class PhaseIndicator implements PhaseListener {



/* (non-Javadoc)
* @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
*/
public void afterPhase(PhaseEvent arg0) {
//
System.out.println("after - " + arg0.getPhaseId().toString());


}

/* (non-Javadoc)
* @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
*/
public void beforePhase(PhaseEvent arg0) {
//

if(arg0.getPhaseId() == PhaseId.RENDER_RESPONSE){
System.out.println("Processing New Request:");

}



System.out.println("before - " + arg0.getPhaseId().toString());
if(arg0.getPhaseId() == PhaseId.RENDER_RESPONSE){
System.out.println("Done With Request!");
}

}

/* (non-Javadoc)
* @see javax.faces.event.PhaseListener#getPhaseId()
*/
public PhaseId getPhaseId() {
//
return PhaseId.ANY_PHASE;
}

}

Any suggestions would be greatly appreciated-Did I forget the do something???

Thanks
Denise


Surround yourself with learners...They will educate you!
Ravindra Rawat
Ranch Hand

Joined: Dec 09, 2004
Posts: 34
Can you kindly provide the server details that you migrated to? If servlet filters are not triggering then you might want to check what version of Servlet spec is supported by the new application server.

Warm Regards
Ravindra
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: phaseListener not working
 
Similar Threads
Using setTransient(true) to correct Duplicate Component Id
JSF Phase Listener????
navigation disable in FIREFOX
Question on rendering
JSF: Tracking user views