title: unable to compare integer object in jsp
body: <p>i am unable to compare "c" and "c1", even if value of object "c" prints 1
  my code is as follow:-</p>
  
  <pre><code>         &lt;%
            Integer c1=new Integer(1);
            Integer c =(Integer) session.getValue("login"); // value of login is int type in servlet
            out.println(c);  //it works correctly
            if(c==c1 &amp;&amp; c!=null)   //it does not work correctly 
            {
             response.sendRedirect("homepage.jsp");
            }
            %&gt;
  </code></pre>
  
  <p>please answer this question</p>