Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

struts2+jquery+ajaxÂÒÂëÎÊÌâ - Java / Java EE

ÎÒµÄstruts2ÓëÇ°¶ËµÄjspµÄ±àÂ붼ÉèÖóÉgbkµÄÁË£¬²¢ÇÒÔÚweb.xmlÖÐÒ²ÉèÖÃÁËfilter¹ýÂË£¬ÎÒÒ²ÖªµÀajaxµÄÌá½»·½Ê½Ä¬ÈÏÊÇutf-8£¬ÓÐûÓкõİ취£¬±ÈÈçÅäÖÃfilterµÈ£¬ÈÃËü²»ÔÙ³öÏÖÂÒÂëÄØ£¿
ºǫ́JAVA´úÂë¼Ó¸öת»»·½·¨

ÄãµÄ¹ýÂËÆ÷ÉèÖñàÂëûÓÐÓõÄ.! Struts2µÄºËÐĹýÂËÆ÷¶¼¸øÄãÕû³Éutf-8ÁË(ĬÈϵÄ),¶ø²»ÊÇajaxµÄÌá½»·½Ê½Ä¬ÈÏÊÇutf-8.
µ±È»½â¾ö°ì·¨»¹ÊÇÓеÎ. ÔÚÄãµÄstruts.xmlÎļþÖÐÅäÖÃ
<constant name="struts.i18n.encoding" value="GBK">
ĬÈÏÊÇUTF-8µÄ



·þÎñÆ÷¶ËÕâôÓà java.net.URLDecoder.decode(v £¬ "UTF-8");

ÎÒÔ­À´µÄÍøÒ³¶¼ÊÇÓõÄgbkµÄ±àÂ뷽ʽ£¬²»Ïë¸ÄÁË£¬¶þÂ¥µÄizard999˵µÄÄÇÖÖ·½Ê½£¬ÎÒÒÔÇ°¾ÍÊÇÕâÑùÅäÖõģ¬²»Æð×÷Óã¬ÆäËü·½·¨ÎÒÔÙÊÔÊÔ

ÄãµÄajaxÌá½»·½Ê½ÊÇʲô°¡£¬ÊÇget»¹ÊÇpost°¡£¬ÒªÊÇget·½Ê½ÔÚÓ¦Ó÷þÎñÆ÷ÖÐÅäÖÃURIEncoding="GBK",ÒªÊÇpost·½Ê½¼ÓÁ˹ýÂËÆ÷Ó¦¸Ã²»»á³öÏÖÂÒÂëÁË¡£

²»Æð×÷ÓÃÂð.? ÎÒÒÔÇ°×öµÄÆð×÷ÓÃÄó.!
ÄãÔÚweb.xmlÀïÃæÅäÖÃÏÂÄǸö³£Á¿¿´¿´,¾ÍÊÇÔÚÄãStruts2¹ýÂËÆ÷ÀïÃæÉèÖÃinit-param

ÒýÓÃ
ÄãµÄajaxÌá½»·½Ê½ÊÇʲô°¡£¬ÊÇget»¹ÊÇpost°¡£¬ÒªÊÇget·½Ê½ÔÚÓ¦Ó÷þÎñÆ÷ÖÐÅäÖÃURIEncoding="GBK",ÒªÊÇpost·½Ê½¼ÓÁ˹ýÂËÆ÷Ó¦¸Ã²»»á³öÏÖÂÒÂëÁË¡£

Õâ¸ö.. Èç¹ûÊÇgetÇëÇó¼ÇµÃÅäURIEncoding


Ïà¹ØÎÊ´ð£º

javaÈÕÆÚ´¦Àí - Java / Java SE

µ±ÖªµÀÒ»¸öÈÕÆÚ£¬ÈçºÎ°ÑÕâ¸öÈÕÆÚËùÔÚÑ®µÄÇ°ºóÁ½¸öÈÕÆÚÈ¡³ö
±ÈÈçÊäÈë20090905£¬¾ÍÊäÈë20090901 20090910
Êä³ö20090901 20090910

È¡µÃÌìÊýºó×÷Ò»ÏÂÅжÏÔÙ°ÑÕâ¸ö·½·¨ÓÃÏÂvoid set(int field, int value)  
......

¹ØÓÚAJAXºÍJSPµÄһЩСÎÊÌâ¡« - Java / Web ¿ª·¢

ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
  %>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......

FCKÉÏ´«Îļþµ½linux·þÎñÆ÷ÎÊÌâ - Java / Java EE

ÇëÎÒÓÃFCKÉÏ´«Îļþ,ÔÚ±¾µØµÄwindows»úÉϲâÊÔ¿ÉÒÔ£¬µ«²¿Êðµ½linux·þÎñÆ÷ÉϾÍÉÏ´«²»ÁËÎļþ£¬ÉÏ´«Îļþʱһֱ¿¨ÔÚÄÇÀï¡£Íû¸÷λ´óϺָµã£¬Ð»Ð»£¡
·¹ý£¬°ïÄ㶥һÏ¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£

ÉÏ´«ÎļþµÄ·¾¶ÎÊÌ⣬ ......

java ÇóÖú - Java / Java EE

insert into [ScholarshipManagement].[dbo].[department] ([department],[specialization] ,[grade]) output inserted.departmentID values(? ,? ,? )
ÇëÎÊ´ó¸çÃÇÕâ¸ösql Óï¾äÓ¦¸ÃÓÃJavaÀïµÄÄǸöÊý¾Ý¿â²Ù×÷·½·¨£¿ ......

javaÖд«Öµ - Java / Web ¿ª·¢

¾ÍÊǼòµ¥µÄ´«ÖµºÍÈ¡Öµ
ÇëÎÊÂ¥Ö÷ÏëÎÊʲô£¿

jspÒ³Ãæ²ÉÓÃ±íµ¥»òÕßjavabean´«Öµ¶¼¿ÉÒÔ£¬Ê¹ÓÃrequest.getParameter()»ñµÃʹÓÃ±íµ¥´«¹ýÀ´µÄÖµ¡£

ÎÊÎÊÌ⣬ÏÈ°ÑÎÊÌâ˵Çå³þµã£¡£¡ ÎÊÌâÌ«Ä£ºý£¡£¡

ÎÊÎÊÌ⣬ÏÈ°ÑÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ