Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

image source code in jsp  RSS feed

 
Pratima Jadeja
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First I allow the user to upload a image. Secondly i allow the user to view the uploaded images. This is the below code for it.
The issue is the image created is not seen, until i refresh my entire project. Once i refresh i can see the image.
Can anyone tell me how to avoid this situation.

<%
String file = (String)publicationNameIterate.next();
String nameOfFile = "http://localhost:1997/Spiritual/publication/thumbnail" + file;
String downloadFile ="http://localhost:1997/Spiritual/publication/" + file;
%>

<td ><IMG src="<%=nameOfFile %>" >
</td>

</tr>

 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems the IMG tag did not survive posting; you can edit your post to include the real IMG tag - be sure to check the "Turn HTML off" checkbox.
 
Pratima Jadeja
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%
String file = (String)publicationNameIterate.next();
String nameOfFile = "http://localhost:1997/Spiritual/publication/thumbnail" + file;
String downloadFile ="http://localhost:1997/Spiritual/publication/" + file;
%>

<td width="170"><IMG src="<%=nameOfFile %>" >
</td>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!