Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image problem for Jboss5

 
vinny kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dear all ,


How to send Images threw InputStream and Datahandler using Jboss5


Thanks& Regards
Vinaya Kumar
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your servlet you need to change the mime type to the proper type for your image. For example, for a PNG you would use:

response.setContentType("image/png")

where response is a javax.servlet.http.HttpServlteResponse (one of the parameters to doPost(), doGet() etc.)
You can find a partial list of mime types in ./server/default/deployers/jbossweb.deployer/web.xml (AS 5.1.0 location)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic