There are many ways to skin a cat. For this particular one, things that come to mind are:
1. Extending Action
2. Using a logging framework
3. Using a
servlet filter
4. Using an AuditTrail class
5. Using a specific base URL for "logged on" pages and the IP tracking facilities in your web server (most of them have some way to do this)