title: Iframe issue in displaying java object
body: <p>Is it possible to display a java object(by pointing it in iframe src) obtained from a servlet(In a jsp page) in an Iframe?</p>
  
  <p>Here is what I've tried.
  I'm storing a pdf file in mysql database as blob type. In the Hibernate bean class I have declared the corresponding variable as Byte[].</p>
  
  <p>Now I'm trying to display the object through Iframe like this.</p>
  
  <pre><code>&lt;% String oid = null;
      oid = request.getAttribute("oid").toString();
       request.setAttribute("oid",oid);
    %&gt;
  
   &lt;jsp:useBean id="cusBean" class="com.zoran.action.CustomBean" scope="page" &gt;
   &lt;jsp:setProperty name="cusBean" property="parentId" value="1" /&gt;
   &lt;jsp:setProperty name="cusBean" property="parentType" value="FILE" /&gt;
   &lt;/jsp:useBean&gt;
  
  &lt;iframe id="displayFrame" src="&lt;%= cusBean.getFile() %&gt;"  width="1000" height="500" FRAMEBORDER="0" value="1"&gt;&lt;/iframe&gt;
  
  And custom bean is the java class where I'm running the hql script to return the blob data through cusBean.getFile().
  </code></pre>
  
  <p>Am I right in doing this? how else can I print a java object variable in an Iframe.</p>
  
  <p>Please help me out on this.</p>
  
  <p>Thanks,
  Aditya</p>