title: Display a session if not null in jsp file
body: <p>I am trying to display a session only if it is not null in jsp file and I am having issues as shown</p>
  
  <pre><code>Syntax error on token "&lt;", invalid Expression 59: 60: &lt;% if(request.getAttribute("message") != null) 61:
  </code></pre>
  
  <p>this is my jsp file where I am checking if the session is not null but it is not working</p>
  
  <pre><code>&lt;% if(request.getAttribute("message") != null)
  {
      &lt;%=session.getAttribute("message")%&gt;
  }
  %&gt;
  </code></pre>
  
  <p>Please how do I display a session only if it is not null</p>