title: SQL Statement using a JSP session
body: <p>I am trying to use a session that I have made in JSP in a sql statement. But having difficulties.</p>
  
  <p>I captured it already and this is the SQL statement I made, but doesnt work.</p>
  
  <pre><code>String mysql="select * from table1 where cottCode="&lt;%= session.getAttribute( "theName" ) %&gt;"";
  </code></pre>
  
  <p>Any help appreciated, thank you.</p>