title: get HttpSession|Request from simple java class not servlet class
body: <p>i want session Object not in servlet class but ordinary from we application.</p>
  
  <p><strong>WEB.XML</strong></p>
  
  <pre><code>&lt;listener&gt;
          &lt;listener-class&gt;com.abc.web.ApplicationManager&lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;listener&gt;
          &lt;listener-class&gt;com.abc.web.SessionManager&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p><strong>ViewPrices.java</strong></p>
  
  <pre><code>public class ViewPrices implements Cloneable, Serializable {
  
   Session session = request.getSession();
                     servletContext.getSession()
                     anyWay.getSession();
  }
  </code></pre>