title: Displaying a blob image in jsp with struts 2
body: <p>Hi I follow an example I saw here but I have a bad result,I have this as <code>ShowImageAction</code>:</p>
  
  <pre><code>public static void execute() throws RemoteException {  
  
  HttpServletResponse response = ServletActionContext.getResponse();  
  response.reset();  
  response.setContentType("multipart/form-data");   
  session = ActionContext.getContext().getSession(); 
  PublicApiService_PortType puerto=(PublicApiService_PortType) session.get("puerto"); 
  ((BasicHttpBinding_PublicApiServiceStub)puerto).setMaintainSession(true); 
  
  MessageContext ctx=(MessageContext) session.get("contexto"); 
  PapiUserInfo[] users; 
  
  users = puerto.getUsers(); 
  Long accountID=users[0].getID(); 
  PapiAccountInfo info=puerto.getAccountInfo(accountID); 
  itemImage=info.getWhiteLabelingLogo(); 
  System.out.println(itemImage); 
  OutputStream out; 
  
  try { 
      out = response.getOutputStream(); 
      out.write(itemImage);  
         out.flush();  
         out.close(); 
  } catch (IOException e) { 
      // TODO Auto-generated catch block 
      e.printStackTrace(); 
  } 
  
  
  
  
  } 
  </code></pre>
  
  <p>Where <code>getWhiteLabelingLogo()</code>; returns me the blob into <code>byte[]</code> and then on my jsp I have this: </p>
  
  <pre><code>&lt;img src="&lt;s:url value="ShowImageAction" /&gt;" border="0" width="100" height="100"&gt;  
  </code></pre>
  
  <p>Why it doesn't work?. is it right?. Thanks so much</p>