Steven Gollery wrote:
One question left: where to put the code that does the redirect? At first I
put it in the method that processes clicks on the "logout" button, but of
course that threw an IllegalStateException.
I don't initially see why that would throw an exception.
The action method associated with the button (h:commandButton) or link
or whatever will run during the Application phase (for non-immediate
components) or the ApplyRequestValues phase (for immediate components).
In either case, the response has not yet been started so sending an http
redirect here seems both valid and appropriate to me.
What error do you get?
Regards,
Simon