想的简单了,这么样还真不成。。。
求教,该咋整呢~~~~
public void sse() throws InterruptedException{ for (int i = 0; i < 10; i++) { //getResponse().setHeader("Access-Control-Allow-Origin", "*"); renderText("hello jfinal ~ delete ...\n\n", "text/event-stream"); Thread.sleep(10000); } }
项目:JFinal