Home > FAQs > How can we display dynamic or static images that can be provided as an array of bytes |

Apache Struts 2 Documentation
How can we display dynamic or static images that can be provided as an array of bytes
Edit Page Browse Space Add Page Add News

To display an image represented as an array of bytes

- Reference an Action for the image src attribute
- Provide a helper method on the Action to return an array of bytes
- Provide a Result Type that renders the array to the response

## Reference an Action

MyAction.jsp

## Provide Helper Methods

MyAction.java

## Provide a Custom Result Type

struts.xml
MyBytesResult.java