锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久超碰亚洲,日本在线观看一区二区,欧美网站在线观看http://www.aygfsteel.com/freeman1984/category/42595.htmlhttp://shop59092284.taobao.com/zh-cnThu, 19 Nov 2009 18:05:59 GMTThu, 19 Nov 2009 18:05:59 GMT60DWR ajaxReverse demo 鍜岀悊瑙?/title><link>http://www.aygfsteel.com/freeman1984/archive/2009/11/19/302961.html</link><dc:creator>鍜栧暋濡?/dc:creator><author>鍜栧暋濡?/author><pubDate>Thu, 19 Nov 2009 10:28:00 GMT</pubDate><guid>http://www.aygfsteel.com/freeman1984/archive/2009/11/19/302961.html</guid><wfw:comment>http://www.aygfsteel.com/freeman1984/comments/302961.html</wfw:comment><comments>http://www.aygfsteel.com/freeman1984/archive/2009/11/19/302961.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/freeman1984/comments/commentRss/302961.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/freeman1984/services/trackbacks/302961.html</trackback:ping><description><![CDATA[     鎽樿: DWR ajaxReverse demo 鍜岀悊瑙?nbsp; <a href='http://www.aygfsteel.com/freeman1984/archive/2009/11/19/302961.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/freeman1984/aggbug/302961.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/freeman1984/" target="_blank">鍜栧暋濡?/a> 2009-11-19 18:28 <a href="http://www.aygfsteel.com/freeman1984/archive/2009/11/19/302961.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>DWR http://www.aygfsteel.com/freeman1984/archive/2009/08/25/293869.html鍜栧暋濡?/dc:creator>鍜栧暋濡?/author>Tue, 25 Aug 2009 08:31:00 GMThttp://www.aygfsteel.com/freeman1984/archive/2009/08/25/293869.htmlhttp://www.aygfsteel.com/freeman1984/comments/293869.htmlhttp://www.aygfsteel.com/freeman1984/archive/2009/08/25/293869.html#Feedback0http://www.aygfsteel.com/freeman1984/comments/commentRss/293869.htmlhttp://www.aygfsteel.com/freeman1984/services/trackbacks/293869.html 

銆傘傘?

]]>
DWR瀛︿範鍙婂簲鐢?浜岋紝forward)http://www.aygfsteel.com/freeman1984/archive/2009/08/25/293870.html鍜栧暋濡?/dc:creator>鍜栧暋濡?/author>Tue, 25 Aug 2009 06:38:00 GMThttp://www.aygfsteel.com/freeman1984/archive/2009/08/25/293870.htmlhttp://www.aygfsteel.com/freeman1984/comments/293870.htmlhttp://www.aygfsteel.com/freeman1984/archive/2009/08/25/293870.html#Feedback0http://www.aygfsteel.com/freeman1984/comments/commentRss/293870.htmlhttp://www.aygfsteel.com/freeman1984/services/trackbacks/293870.html浣跨敤dwr鎴戜滑鍙互鍔ㄦ佽姹備竴涓〉闈㈠唴瀹瑰埌褰撳墠欏碉細涓涓嬫槸浠g爜錛?/p>

1錛屽悗鍙版柟娉曪細

public String getInclude() throws ServletException, IOException {
WebContext ctx = WebContextFactory.get();
System.out.println(ctx.getCurrentPage());
ctx.getHttpServletRequest().setAttribute("test", "hello ,test forward");
return ctx.forwardToString("/iclude.jsp");
}

 

2錛宒wr閰嶇疆錛?/p>

 <create javascript="testinclude" creator="new">
<param name="class" value="com.dwr.TestInclude"/>
</create>

 3錛岄〉闈細

<html>
<head>
<base href="<%=basePath%>">
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/util.js"></script>
<script type="text/javascript" src="dwr/interface/testinclude.js"></script>
<script type="text/javascript">
function getInClude(){
testinclude.getInclude(
function(data){
dwr.util.setValue("fq",data,{ escapeHtml:false });
}
);
}
</script>
</head>
<body>
<input type="button" value="include page"
onclick="javascript:getInClude()" />
<div id="fq">
</div>
</body>
</html>

 2錛屽叾涓嬌鐢ㄤ簡

WebContext ctx = WebContextFactory.get();

ctx.forwardToString("/iclude.jsp");

鏌ョ湅dwr婧愪唬鐮侊細

 getServletContext().getRequestDispatcher(url).forward(realRequest, fakeResponse);

 鍏朵腑錛歠akeResponse

HttpServletResponse fakeResponse = new SwallowingHttpServletResponse(realResponse, sout, realResponse.getCharacterEncoding());

  鑰孲wallowingHttpServletResponse浣跨敤浜哤riterOutputStream

 public SwallowingHttpServletResponse(HttpServletResponse response, Writer sout, String characterEncoding)
{
super(response);
pout = new PrintWriter(sout);
outputStream = new WriterOutputStream(sout, characterEncoding);
this.characterEncoding = characterEncoding;
}

 WriterOutputStream錛氫篃灝辨槸瀵?ServletOutputStream鐨勫皝瑁呫?/p>

public final class WriterOutputStream extends ServletOutputStream

 





]]>
主站蜘蛛池模板: 栖霞市| 湟中县| 通榆县| 绥德县| 宣城市| 吉木萨尔县| 淮安市| 上饶县| 隆化县| 中阳县| 龙山县| 三穗县| 大悟县| 乌鲁木齐县| 宝坻区| 长泰县| 高平市| 壶关县| 澎湖县| 连州市| 牙克石市| 阿克| 盐边县| 丰顺县| 崇明县| 毕节市| 庄河市| 宝兴县| 华容县| 班玛县| 壤塘县| 沧州市| 会昌县| 雅江县| 渭源县| 正宁县| 合水县| 香格里拉县| 邳州市| 兴和县| 金寨县|