They are in different layers of the application. A HttpSession is used in the front end/web layer of an application to keep track of data specific to a user. An EJB Session bean is used in the back end/EJB layer. There are two types of session beans. A stateful session bean can also keep track of data specific to a user. A stateless session bean cannot keep track of state.
Thank you for your fast replay, but still i have one doubt .can we maintain one session objct to the complete application that application has both weblayer and Ejb layer?