Vita Rara: A Life Uncommon

2 answers

1. Before you redirect the user to the login page, store the original address of the request to the session (something like session.put("going_to", address)). After the login you can then inspect the session redirect the user to the andress. Don't forget to remove the address from the session, so that the user won't be mistakenly redirected again.

2. Yes, see the struts 2 mailreader app for best practises:

Map session = actionInvocation.getInvocationContext().getSession();

You don't need to cast the object to a HttpSession...

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options