public String invokeApplication(FacesContext facesContext) {
Controller controller = (Controller) VariableResolverUtils.resolveVariable(facesContext, "controller");
Address address = controller.getCurrentAddress();
if (address.hasPicture()) {
Picture picture = address.getPicture();
byte[] content = picture.getContent();
HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
if (content != null && content.length > 0) {
response.setContentType(picture.getContentType());
ByteArrayInputStream inputStream = new ByteArrayInputStream(content);
try {
IOUtils.copy(inputStream, response.getOutputStream());
} catch (IOException e) {
LOG.error("", e);