• Post Reply Bookmark Topic Watch Topic
  • New Topic

creating link in jsp

 
Ashish Saraf
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a jsp the sample code is as follows:
<% blobFieldValue = BlobsMasterAB.getBlobField("180");
ServletOutputStream oStream = response.getOutputStream();
%>
<a href="http://www.mylink.com" img src ="<%oStream.write(blobFieldValue); %>" border="0"></a>
<% oStream.flush();
oStream.close();
%>
blobFieldValue returns byte[]
the problem is the href="http://www.mylink.com" does not work
can any one explain
thanks,
ashish saraf

 
Rama Raghavan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the link work without img src tag ?
...img src ="<%oStream.write(blobFieldValue); %>" ...
Looks like "=" is missing -
Expressions in JSP follows <%= .. %>

------------------
_________________________
Rama Raghavan
SCJP2
 
Ashish Saraf
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it works without src tag.
since oStream is void '=' is not required.
regards,
Ashish Saraf
Originally posted by Rama Raghavan:
Does the link work without img src tag ?
...img src ="<%oStream.write(blobFieldValue); %>" ...
Looks like "=" is missing -
Expressions in JSP follows <%= .. %>

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!