Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How to add custom HttpSessionListener
Hi all, how can I add a custom HttpSessionListener to Liferay or serlet container. Where should i place the listener class. I'm using LR 7.0.4 GA5, OSGI module portlet. Thanks
First, you should upgrade and patch. Urgently and Importantly!
Then, the question is what you're going to do with this Listener. Most likely there's an even better place to add your implementation, e.g. a Lifecycle Action - e.g. one that's executed on every login event, or others. Which one it is requires more knowledge about what you're doing. I'd say that most likely a HttpSessionListener is often too low-level for the general abstraction that you get with Liferay.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™