Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Trigger HttpSessionBindingListener in AEM

Level 3
Level 3


I am trying to trigger the valueBound method of HttpSessionBindingListener. Whenever I set the session attribute.It is not working.

I have written class which implements HttpSessionBindingListener 


public class SessionBinding implements HttpSessionBindingListener,  {

    public  void valueBound(HttpSessionBindingEvent paramHttpSessionBindingEvent) {"Session bounded ");

    public void valueUnbound(
            HttpSessionBindingEvent paramHttpSessionBindingEvent) {}


In my servlet,

SlingServlet(paths = "/bin/testing", methods = "POST")
public class TestServlet extends SlingAllMethodsServlet {

protected void doGet(SlingHttpServletRequest request,
            SlingHttpServletResponse response) throws ServletException,
            IOException {

HttpSession session = request.getSession();
        session.setAttribute("test", "test");



I set session attribute.But it doesnt called my valueBound method

Could some one help me to resolve this issue. 

Am I missing any configuration here?



1 Reply