I have created a Bar Chart using Jfreechat, the Bar Chat is a jpg file, Now I want to display this jpg file in browser. I am using <img src > tag for displaying jpg file in servlet but it is not displaying the jpg file always (I am using NetBeans 5.5). [I have two files bar_chart3D.jpg & bar_chart.jpg - it is displaying the jpg when I give the src as bar_chart3D.jpg but not displaying jpg when I give bar_chart.jpg, I dont know the reason.]
I request masters to help me to display jpg files using servlet.
if I give bar_chart3D.jpg then it is displaying. So that means it may not be a problem with permissions.
Joined: Mar 22, 2005
An image needs to be in a publicly accessible directory, not in whatever directory the servlet code or classes are in. I'd advise to set up and test the web app outside of any IDE. Then it should become clear quickly what the problem is.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com