This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Struts and the fly likes How to display a dynamic image along with other fields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to display a dynamic image along with other fields" Watch "How to display a dynamic image along with other fields" New topic
Author

How to display a dynamic image along with other fields

siva kumarl
Greenhorn

Joined: Nov 29, 2008
Posts: 21
Hi Friends..
I have to display a image in jsp page along with other fields using struts.
i.e.,I am reading a employee details along with his/her image and storing in the database,i known how to store and read a image from database,but i am unable to display image with other fields.
Please give me suggestion how to display a image using Action class,if possible give me code.

Thanks,
Siva
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you search the web you'll find many responses to similar questions. The nutshell version is that you create an action that streams the image bytes to the response and return null to indicate that the action has handled the response.

http://letmegooglethatforyou.com/?q=display+image+with+struts+action
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to display a dynamic image along with other fields
 
jQuery in Action, 3rd edition