How to show html in a conditional statement
<p>I am trying to render html outside my conditional statement on a jsp file and cannot get the html to show on the else clause:</p>

<pre><code> &lt;%@ page language="java"  %&gt;

 &lt;%
 HttpSession session = request.getSession(false);
 if (!request.isRequestedSessionIdValid()){
// not logged in 
  response.sendRedirect("login.jsp");


 }else{ //display html 
 %&gt;

 &lt;html&gt;
 .....
 &lt;/html&gt;

 &lt;% } %&gt;
</code></pre>

<p>I have tried removing the else clause like this but with no html displaying. Session detection is working.</p>

<pre><code> &lt;%@ page language="java"  %&gt;

 &lt;%
 HttpSession session = request.getSession(false);
 if (!request.isRequestedSessionIdValid()){
// not logged in 
  response.sendRedirect("login.jsp");


 } %&gt;

 &lt;html&gt; .... &lt;/html&gt;
</code></pre>

<p>Any ideas on what the issue could be?</p>