This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSP and the fly likes dispaly image in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "dispaly image in jsp page" Watch "dispaly image in jsp page" New topic
Author

dispaly image in jsp page

ramesh poorella
Ranch Hand

Joined: Jul 19, 2011
Posts: 60
please tell me how to display barcode in jsp page.... i have a barcode image in my system file... i am using img tag in my jsp.... but it is not displaying..
please help me..

this is my code. e.jpeg is barcode image



<html>
<body>
<p> </p>
<div align="center">
<center>
<IMG SRC="C:\Images\e.jpeg" width="200" height="100" >
<table border="0" cellpadding="0" cellspacing="0" width="460" bgcolor="#EEFFCA">

<tr>
<td width="100%">

</tr>
<tr>
<td width="100%"><b>  Date
and time is:  <font color="#FF0000">

<%= new java.util.Date() %>
</font></b></td>
</tr>

</table>
</center><br><br>
<input type="submit" value="PRINT" name="print" />
</div>
</body>
</html>








please give me to suggession how to display that





thanks
tang jizhong
Greenhorn

Joined: Jul 19, 2011
Posts: 1
Hello, you should be in your next project to create a images directory, and e.jpeg put inside. Then use the images / e.jpeg this relative path for a visit.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

You cannot use a file path. You need to use the URL to the image as it served by the container.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: dispaly image in jsp page