lundi 20 juillet 2015

How to assign image src= string variable in JSP?

    
<%
      String fn=session.getAttribute("fn").toString();
      fn="img/"+fn;
%>
    <tr>
      <td width="20%" style="border-style: none; border-width: medium" height="17">
      </td>
      <td width="20%" style="border-style: none; border-width: medium" height="17" bgcolor="#FFFFFF">
      </td>
      <td width="20%" style="border-style: none; border-width: medium" height="17" bgcolor="#FFFFFF">
      <img border="0" src="<%=fn%>" width="90" height="90"></td>
      <td width="20%" style="border-style: none; border-width: medium" height="17">
      </td>
    </tr>

I am generating a QR image based on user input in a previous JSP and displaying it in the above JSP. QR generation is working fine in Eclipse(Mars) Dynamic web project. But I am not able to display image using the above JSP. I tried removing cache from browser and restarting eclipse. I saw following errors:




Aucun commentaire:

Enregistrer un commentaire