Which phase is it?
Cagatay
On 7/27/06, QiuyunZhong <[EMAIL PROTECTED]> wrote:
Hey,guys,I know there are some question related to
illegalstateexception,however i've searched the forum for whole day and
still cann't solve the problem.
This is the description of my problem:
I added a phaselistener in web.xml to control user's visit of our web
site.The listener just implements this function:when user doesn't sign on
the site,it redirects user to the signon.jsf page.
Then we used code like this:
if (identity == null)
{
if (!request.getRequestURI().endsWith(" EmployeeSignOn.jsf")
&& event.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
{
org.apache.catalina.connector.ResponseFacade response =
(ResponseFacade)FacesContext.getCurrentInstance().getExternalContext()
.getResponse();
try
{
response.sendRedirect(DEFAULT_URL);
}catch( Exception e).....
in afterPhase function
However,it throws illegalStateException,I traced on ResponseFacade,it showed
the response is commited.
The code is simple,and i don't know when the response is commited,i havn't
called responseComplete yet.I think this may be caused by my confuzed
understand of the lifecycle.
Any one can give me some hint or other method to implement the requirement?
Thanks a lot.
--
View this message in context: http://www.nabble.com/sendRedirect-throws-illegalstateexception-tf2009802.html#a5521786
Sent from the MyFaces - Users forum at Nabble.com.

