This content has been marked as final.
Show 1 reply
-
1. Re: Does @FormAuthentication obey redirects
ssilvert Sep 29, 2011 2:41 PM (in response to martinuk)I think your problem is in your @InitialPage. The argument should be a JSF page like @InitialPage("/index.jsf"). When you specify @FormAuthentication you are saying that the JSF page is protected by a form. So when you request http://mydomain/myapp/index.jsf you will be presented with a form. If JSFUnit does a successfull login you will be redirected to index.jsf. At this point JSFUnit returns control to the test and the proper view should be returned from getCurrentViewID().
If your application is not using the "protected page" idiom then you might need to implement your own InitialRequestStrategy.
Stan