Hi, you've reached the website of Mark Menard, Freemason, developer, businessman, photographer, motorcyclist and all around nice guy.
The main joy in my life is Sylva, my loving partner and friend. (You will see plenty of pictures of her. Also check out our site.) My professonal career is running a consulting firm concentrating on business automation and custom software. I enjoy software development, motorcycles, photography, dancing, freemasonry and travel.
Here you will find galleries of my latest photos, thoughts on software development, freemasonry, the occassional politics, and other things. Enjoy your time here.
Mark
An ongoing photographic study of Freemasonry.
To contact Mark send an email to mark@mjm.net. You will receive an auto response from my mail server to verify you're not a spammer.
© Mark Menard 2002-2007
redirect the usere to where he wants to be
2 Questions:
1. After a successful login I don't want to redirect the user to a hardcodes page (as you do) but i want the user to be redirected where he wanted to go. E.g. if a user clicks on 'sell' he will be forced to log in by the interceptor and after login the sell-page should be shown. If he vlicks on buy the buy-page should be shown after login. Is there an elegant way to do this?
2. Is there i nicer way to access the session? Access the session in an action is very easy (implement SessionAware) and you have a simple map to get and set values. When working with HttpSession i dont't have a map. I'm allways writing a service that just gets a value out of the sessionattributes and does all the casting for me. Now with struts2's actions and interceptors i need to write that service two times. one works with HttpSession, one with map. Am I missing something?