Acegi handles where the user should wind up after logging in fairly well if a request for a protected page results in the display of the login form, but not when that form is explicitly requested by the user. My app has many pages that do not require that users be logged in, but which may have more content/links for users that are. If a non-logged in user is viewing one of those pages, and follows the "Login" link (to login.jsp), after they login they end up looking at the mainmenu, and I'd rather have them back at the page from which they selected the login link.

I have unsuccessfully searched a number of times to try to figure out what determines that the mainmenu page is where they end up after logging in. Can anyone point me toward that configuration? I don't know if this is a struts2 setting, an acegi setting, or something else, and so have been stymied in finding appropriate documentation...

It seems the simplest way to deal with this would be to either make the action displaying the login form store the referring page in the session (or a hidden field in the login form), so that it can be pulled out after login, or to explicitly add a "from" style argument to the login link, and do the same thing with that info. Since I can't seem to figure out what determines that the mainmenu should be the default, though, I don't believe I would know what to do with that url even if I knew where I wanted to go...

Simply composing these requests for help always seems to
be helpful. I may have just found part of my answer! I see that index.jsp contains:
<c:redirect url="/mainMenu.html"/>
Does a successful login with no knowledge of where to go end up going to / and therefore getting redirected to mainmenu as a result of this .jsp? Is it possible to configure acegi to go someplace other than "/" so I can put in a smarter redirect there without screwing up the site's "home page"? I guess this also answers my question that it's the Acegi documentation I need to study more...

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to