iframeǶÈëjsp²»±äÐÎ
ÓеÄʱºò»áÍü¼Ç£¬¼Ç¼һÏ£º
<iframe id="xx" name="xx" width="515" height="177" scrolling="no" border="0" marginwidth="0" marginheight="0" frameborder="0" src="Xx.jsp"></iframe>
Ҫʹjsp²»±äÐΣ¬Ö÷ÒªÊÇmarginwidth="0" marginheight="0"Á½¸öÊôÐÔ¡£
Ïà¹ØÎĵµ£º
Ê×ÏÈҪ˵µÄ¾ÍÊÇ ajax ÊÇÎÞ·¨ÊµÏÖÉÏ´«ÎļþµÄ£¬¿ÉÒÔÏëÒ»ÏÂajaxÓëºǫ́ͨÐŶ¼ÊÇͨ¹ý´«µÝ×Ö·û´®£¬ÔõôÄÜ´«µÝÎļþÄØ£¿Æäʵ³öÓÚ°²È«¿¼ÂÇjsÊDz»ÄܲÙ×÷ÎļþµÄ£¬ËùÒԾͲ»ÒªÔÙ˵ÓÃajaxÀ´ÊµÏÖÎļþµÄÉÏ´«ÁË£¬ÕâÊDz»¿ÉÄܵġ£
¶ø±¾ÎÄʵÏÖµÄÎļþÉÏ´«Ò²ÊÇÎÞÒ³ÃæË¢Ðµģ¬¿ÉÒÔ˵ÊÇÒ»ÖÖ"ÀàËÆAJAX"·½·¨¡£
&n ......
ͨ¹ýrequest.getParameter(String name)·½Ê½È¡²ÎÊýnameÖеÄֵʱ£¬ÈçºÎ½â¾öÖÐÎÄÂÒÂëÎÊÌâ
·½·¨Ò»£ºÔÚËùÓеÄȡֵÓï¾ä֮ǰÉèÖÃrequestµÄ±àÂ뷽ʽ£¬¼´request.setCharacterEncoding("utf-8") //utf-8Ò²¿ÉÒÔΪgb2312
ǰÌáÌõ¼þÊÇ£º²ÎÊýnameËùÔÚµÄÒ³ÃæºÍ»ñÈ¡ ......
struts2µÄʵÏÖ·½·¨
LangSelector.jsp
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<script type="text/javascript">
<!--
function langSelecter_onChanged() {
& ......
package com.pan.encod;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
public class EncodFilter impl ......
¸Ã±êÇ©ÓÃÓÚÏòÄ¿±êÒ³ÃæÖеIJÎÊý´«Öµ£¬¸Ã±êǩͨ³£Óëjsp:include»òjsp:forward±êǩһÆðʹÓÃ
¸ñʽ£º<jsp:param name=? value=? />
name£ºÄ¿±êÒ³ÃæÖеÄij²ÎÊýÃû
value£ºÏònameÖ¸¶¨µÄ²ÎÊýËù´«µÄÖµ
Ò»¸öÒ³ÃæÖпÉÒÔÊ ......