title: jsp unable to put session attribute into string
body: <p>i'm having an issue with a session attriblute in a jsp page, i would like to pass it into a string so that i can use it to query a database eg, </p>
  
  <pre><code>String group=session.getAttribute("group"); 
  </code></pre>
  
  <p>i know it has been correctly populated because if i put the below in a page it displays the correct value </p>
  
  <pre><code>&lt;%=
  session.getAttribute("group")
   %&gt;
  </code></pre>
  
  <p>the error i am getting is </p>
  
  <p>Type mismatch: cannot convert from Object to String</p>
  
  <p>is there a different way to put a session variable into a String? or am i doing it completely wrong. any assistance much appreciated.</p>