【发布时间】:2012-02-03 00:59:23
【问题描述】:
如果我们有 Servlet,
protected void doGet(HttpServletRequest req, HttpServletResponse resp){
resp.getOuputStream().write(somthing);
}
上面给出了 servlet 输出流,ZK 中有什么方法可以做到这一点。
【问题讨论】:
如果我们有 Servlet,
protected void doGet(HttpServletRequest req, HttpServletResponse resp){
resp.getOuputStream().write(somthing);
}
上面给出了 servlet 输出流,ZK 中有什么方法可以做到这一点。
【问题讨论】:
您对此的真正用例是什么?
如果你在 html 中写一些细节, 最好直接使用zk组件。
在某些情况下,您可以从执行中获得响应。
((HttpServletResponse)Executions.getCurrent().getNativeResponse()).getOutputStream()
但我认为这不是一个好主意,在使用这种方法之前,请确保您知道自己在做什么。
最好提供您的用例而不是代码 sn-ps。
【讨论】:
我找到了这个解决方案,使用 ZK 组件:
Clients.evalJavaScript("window.open('http://www.google.com','','top=100,left=200,height=600,width=800,scrollbars=1,resizable=1')");
【讨论】: