-
1. Re: Overwrite j_security_check redirect
mrforms Jan 15, 2006 12:34 PM (in response to happyfrog)I ran into that problem myself a while ago. I was looking for a good way to do this. I came up with a not so pretty solution before we decided to use struts.
What I did is I implemented an HttpSessionListener and on the sessionCreated event, I would use the requestDispatcher through the session and forward the response to another resource. I find this solution very bad.
Once we migrated to struts, we simply extended the RequestProcessor class and would verify on every action that the user would have an 'initialized' state, if not, we would forward him to another action.
Another solution would be to add a servlet filter that would verify the content of your session for your variables, if they are not present it would either add them, or do other processing.
I would like to see better approach to this problem. If you have a solution, please post it. -
2. Re: Overwrite j_security_check redirect
happyfrog Jan 25, 2006 9:39 AM (in response to happyfrog)I've been using the filter solution to check for a session variable so far but I'm not satisfied with it. The same goes for checking in every action, either solution seems inappropiate.
But thank you for your suggestions anyway, I'll post it inhere if I come up with something ingenious - which is highly unlikely :) -
3. Re: Overwrite j_security_check redirect
lost_traveller Jun 14, 2006 10:00 AM (in response to happyfrog)Thought I'd resurrect this post as I am having the same problem, it seems to be a common problem as I've found many people asking the same question. There must be a way within the spec to do it so that after logging in you always go to the homepage?
Does anyone have any neat solutions? -
4. Re: Overwrite j_security_check redirect
devesh_chanchlani Jul 6, 2007 12:51 PM (in response to happyfrog)Can refer to the below URL:
http://java.sys-con.com/read/37660.htm