Please if anyone can help me to solve below errors !
---------------------------------------------------------------------------------------------------------
*Errors:

java.lang.NullPointerException
        at mypackage.MyOwnEventListener.attributeAdded
(MyOwnEventListener.java:33)
        at org.apache.catalina.session.StandardSession.setAttribute
(StandardSession.java:1706)
        at
org.apache.catalina.session.StandardSessionFacade.setAttribute
(StandardSessionFacade.java:163)
        at servlets.GreetingServlet.doGet(GreetingServlet.java:51)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
718)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
831)

-----------------------------------------------------------------------------------------------------
* MyOwnEventListener

public void attributeAdded(HttpSessionBindingEvent evt) {

        servletContext  = evt.getServletContext();
        servletContext.log("attributeAdded(HttpSessionBindingEvent se)
method is invoked");
       throw new UnsupportedOperationException("Not supported yet.");
    }

    public void attributeRemoved(HttpSessionBindingEvent se) {
        servletContext  = se.getServletContext();
        servletContext.log("attributeRemoved(HttpSessionBindingEvent
se)method is invoked");
        throw new UnsupportedOperationException("Not supported yet.");
    }
-------------------------------------------------------------------------------------------------------
*GreetingServlet.java

        HttpSession session = request.getSession();
        session.setAttribute("att","attribute1");
---------------------------------------------------------------------------------
* ResponseServlet.java

request.getSession().removeAttribute("att");
request.getSession().invalidate();
-----------------------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to