博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
tapestry显示image
阅读量:7101 次
发布时间:2019-06-28

本文共 937 字,大约阅读时间需要 3 分钟。

hot3.png

https://github.com/balsaroripublic class ImageTest {    @Inject    private ComponentResources _resources;    public Link getChart3() {        return _resources.createEventLink("chart", false, null);    }        public StreamResponse onChart(){        return new StreamResponse() {            public String getContentType(){                return "image/png";            }            public InputStream getStream() throws IOException {                   try {                       return new ClasspathResource("diagrams/vacation.png").openStream();                   } catch (IOException ex) {                       throw new RuntimeException("Cannot read image file.", ex);                   }             }            public void prepareResponse(Response response){}        };    }}ImageTest.tml文件
    
      
image display    
            
    

转载于:https://my.oschina.net/u/1453451/blog/270836

你可能感兴趣的文章
再次来到新的一周
查看>>
〖原创〗使用Docker过程中注意事项之壹(文章末尾有彩蛋!)
查看>>
MyBatis学习(四)
查看>>
http协议请求头的意义
查看>>
如何把Crystal Reports报表转换为ActiveReports报表
查看>>
如何编写更好的SQL查询:终极指南-第二部分
查看>>
【实验一】交换机的基本配置
查看>>
安卓学习-Android布局优化
查看>>
决心书
查看>>
搭建DNS域名解析
查看>>
linux下解压zip文件
查看>>
动态路由实现OSPF和RIP协议实现全网互连互通
查看>>
根据Fragment布局高度来自动适应的Viewpager
查看>>
“互联网+”时代,办公必“上云”?
查看>>
如何快速将Excel表格转换成PDF
查看>>
云计算在未来一年的发展预测
查看>>
kafka实战
查看>>
服务器常用命令及使用
查看>>
报错:Socket connection closed by the other side (how rude!)
查看>>
iOS之RunLoop
查看>>