File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Image problem for Jboss5" Watch "Image problem for Jboss5" New topic

Image problem for Jboss5

vinny kumar

Joined: Jan 20, 2011
Posts: 7

Dear all ,

How to send Images threw InputStream and Datahandler using Jboss5

Thanks& Regards
Vinaya Kumar
Peter Johnson

Joined: May 14, 2008
Posts: 5852

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:


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
I agree. Here's the link:
subject: Image problem for Jboss5
It's not a secret anymore!