Firewall: Content type required

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
muellerg
Posts: 2
Joined: Tue Apr 08, 2003 11:23 am

Firewall: Content type required

Post by muellerg » Tue Apr 08, 2003 12:06 pm

Hi,

my image file is produced but not shown.
I set java.io.tmpdir on %CATALINA_HOME%\temp (Tomcat 4.1.12) and the images was produced there.

My 'jsp'-call is:
String graphURL = request.getContextPath() + "/DisplayChart?filename=" + filename;
<img src="<%= graphURL %>" width=400 height=300 border=0 usemap="#<%= filename %>">

The Firewall says: Content type required.

What should I do?
Thank you in advance!
George

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Tue Apr 08, 2003 7:41 pm

Hi,

in your DisplayChart servlet add the line

response.setHeader("content/type", "image/...");

where image/... is your imagetype:
  • png for *.png files
    jpeg for *.jpeg, *.jpg, *.jpe files
    gif for GIF images
This should solve your problem.

Have more fun,
said Thomas

muellerg
Posts: 2
Joined: Tue Apr 08, 2003 11:23 am

Firewall: Content type required

Post by muellerg » Wed Apr 09, 2003 9:27 am

Thanks for the tip.
It works now!

George

Locked