public class ImageBytesResult implements Result {
public void execute(ActionInvocation invocation) throws Exception {
ImageAction action = (ImageAction) invocation.getAction();
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(action.getContentType());
response.getOutputStream().write(action.getImageInByte());
response.getOutputStream().flush();
}