锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久综合伊人77777麻豆,在线一区欧美,亚洲视频一区二区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

 





]]>
主站蜘蛛池模板: 长汀县| 枝江市| 阿拉善右旗| 宁陕县| 井冈山市| 玉山县| 木里| 石嘴山市| 南雄市| 宜春市| 麻江县| 永春县| 绵阳市| 阜城县| 兴国县| 宁远县| 乌拉特中旗| 华宁县| 温宿县| 合水县| 禄劝| 温泉县| 昌平区| 武功县| 潮州市| 莱芜市| 台前县| 昆山市| 沧源| 防城港市| 罗山县| 台南市| 贞丰县| 伊金霍洛旗| 庆元县| 陇川县| 泽州县| 福鼎市| 章丘市| 清镇市| 静海县|