Inline ... On 1/23/06, Jason Vincent <[EMAIL PROTECTED]> wrote: > Hey there, > > I've got some unexpected navigation stuff going on, that I was hoping > someone can help explain. > > Here is my use-case: > 1) Home page is requested. > 2) user isn't logged in, so redirect to login url. > 3) after login, navigate to home. > > In my logs, I'm seeing this behavior, which is wierd... This is just > the initial request to the home page, I didn't hit the login button, > just yet. > > HomeVC.init(), requestURI=/cpt/home.jsf > HomeVC.prerender(), requestURI=/cpt/home.jsf > BaseViewController - /cpt/home.jsf is a secure url and not logged in, > redirecting to login: /login/login.jsf > HomeVC.destroy(), requestURI=/cpt/home.jsf > HomeVC.init(), requestURI=/cpt/home.jsf > HomeVC.prerender(), requestURI=/cpt/home.jsf > BaseViewController - /cpt/home.jsf is a secure url and not logged in, > redirecting to login: /login/login.jsf > HomeVC.destroy(), requestURI=/cpt/home.jsf > > The init,prerender,destroy are not called for LoginVC - Why not? >
This is definitely wierd, all right. It looks like the redirect from "/cpt/home.jsf" to "/login/login.jsf" did not actually happen ... instead it seems to have redisplayed the home page again. How are you actually doing the redirect? One other quick thing to check ... in your server's log messages, do you see any warning messages that look like this? WARNING: No ViewController for viewId /foo/bar.jsf found under name baz If you do, its a sign that your view controller managed beans are not named as Shale is expecting them ("cpt$home" and "login$login" for the paths you are listing above). Craig > The wierd part is that the browser behavior is working as expected - > up to a point. > Once I hit the login button, the user is logged in, but the navigation > rule in faces-config, isn't sending the browser to the home url. > > Another interesting thing... after the login form is displayed, and I > Manually enter the login URL - the init,prerender, and destroy methods > are not called by ANY ViewController. > > PS... I do have no-cache meta tags in the jsps, and I also set the > headers in my baseViewControler.prerender method - so at least the > browser shouldn't be caching anything. > > Can anyone explain what is going on? > > Any help is appreciated. > Thanks, > Jason > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]