Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

content type

Status
Not open for further replies.

joelmac

Programmer
Jun 4, 2002
92
CA
how do i set the content type of the outputed page to 'image/jpeg'? ________________________
JoelMac
 
Should be, using your ServletResponse res
res.setContentType( "image/jpeg" );
PrintWriter out = res.getWriter();
out.println( jpgdata );

Though I have a feeling the PrintWriter isn't the right class to use for the output (it'll probably interpret the funny char's in the jpgdata), but I don't know what to recommend to use instead.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top