aspose file tools*
The moose likes JBoss/WildFly and the fly likes Image problem for Jboss5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Image problem for Jboss5" Watch "Image problem for Jboss5" New topic
Author

Image problem for Jboss5

vinny kumar
Greenhorn

Joined: Jan 20, 2011
Posts: 7

Dear all ,


How to send Images threw InputStream and Datahandler using Jboss5


Thanks& Regards
Vinaya Kumar
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

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)


JBoss In Action
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Image problem for Jboss5