 <p>Your call to <code>setAttribute</code> uses the key <code>"userbean"</code>, then your call to <code>getAttribute</code> uses <code>urbean.getUser_mobile()</code>.</p> <p>Unless <code>urbean.getUser_mobile()</code> returns <code>"userbean"</code> then <code>getAttribute</code> will return <code>null</code>.</p> <p>Given the code setting the attribute is:</p> <pre><code>session.setAttribute("userbean", urbean); </code></pre> <p>The code to get the attribute should be:</p> <pre><code>User_Registration urbean = (User_Registration)session.getAttribute("userbean") </code></pre> <p>You have to use the same key to <em>get</em> that you used to <em>set</em>...</p>