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

Jsp apache common fileupload ÎļþÉÏ´« ÂÒÂë

ÔÚactionÀïʹÓÃfileuploadʱ£¬´ÓreqeustµÃµ½µÄÖÐÎÄÊý¾ÝΪÂÒÂ룬³¢ÊÔʹÓÃÁË
Java´úÂë
1.   DiskFileItemFactory factory = new DiskFileItemFactory();  
    ServletFileUpload upload = new ServletFileUpload(factory);  
    upload.setHeaderEncoding("utf-8")  
 
2.jspÎļþµÄrequest.setCharacterEncoding("UTF-8");  
 
3.      FileItem item = (FileItem) itr.next();  
 
     String value = new String(item.getString().getBytes()) ;  
 
¾ùÎÞЧ£¡  
 
×îÖյĽâ¾ö°ì·¨ÊÇ Ê¹Óà org.apache.commons.fileupload×é¼þÀïµÄÒ»¸ö·½·¨:  
 
    String value = new String(item.getString("UTF-8")


Ïà¹ØÎĵµ£º

JSÓëJSPµÄÇø±ð(תÔØ)


ÔÚ¸÷ÖÖÍøÒ³ÖÆ×÷¼¼ÊõÂÛ̳ÖУ¬³£³£ÓÐÈËѯÎÊjavascriptÓëJavaÓÐʲôÇø±ð£¬ÉõÖÁÓÐÈËÎóÈÏΪjavascript¾ÍÊÇJava¡£javascriptÓëJavaȷʵÓÐÒ»¶¨µÄÁªÏµ£¬µ«ËüÃDz¢²»ÏñÎÒÃÇÏëÏóµÄÄÇÑùÁªÏµ½ôÃÜ£¬ÉõÖÁ¿ÉÒԿ϶¨µØ˵ËüÃÇÓкܴóµÄÇø±ð¡£ 
¡¡¡¡Ê²Ã´ÊÇJavaScript £¿ 
¡¡¡¡JavaScript ÊǶԠECMA 262 Ó ......

java³ÌÐòÖе÷ÓÃÉãÏñͷʵÏÖjsp³ÌÐòÉãÏñÍ·Êý¾Ý²É¼¯

½üÆÚµÄÒ»¸öÏîÄ¿ÐèҪʵÏÖÉãÏñͷͼÏñ²É¼¯£¬¾­¹ýһϵÁеÄÕÛÌÚÒÔºó£¬ÖÕÓÚʵÏÖÁËÕâ¸ö¹¦ÄÜ£¬ÏÖÕûÀíһϡ£
±¾Éí¾Íjava¼¼ÊõÀ´Ëµ£¬ÒªÊµÏÖÉãÏñÍ·¶þ´Î¿ª·¢£¬²É¼¯ÉãÏñͷͼƬ£¬ÐèҪʹÓõ½JMF£¬JMFÊʺÏʹÓÃÔÚj2se³ÌÐòµ±ÖУ¬ÎÒÐèÒªÔÚweb³ÌÐòÖе÷ÓÃÉãÏñÍ·£¬ºÜÃ÷ÏÔJMFÊǸ㲻¶¨ÁË£¬Ïë¹ýдһ¸öapplet³ÌÐò£¬Ö»ÊÇÄǶ«Î÷ÒªÇó¿Í»§¶Ë±ØÐëÒªÓÐjre»·¾ ......

JSP/servlet¿ª·¢µãµÎ

1.²¿ÊðÈýÖÖ·½Ê½£º
   (1) ÔÚserver.xmlµÄHost±êÇ©ÄÚн¨Ò»¸öContext±êÇ©
     <Context path="/learn1" reloadable="true" docBase="E:\work\tech\project\learn1\WebRoot" workDir="E:\work\tech\project\learn1\WebRoot\work" />
      * workDirÊÇÖ¸To ......

JSPÖÐÒ³Ãæ×Ô¶¯¶¨Ê±Ë¢ÐÂ


1.JSPÖÐÒ³Ã涨ʱˢÐÂ
Java
´úÂë < type="application/x-shockwave-flash" width="14" height="15" src="http://penghuaiyi.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" src="http://penghuaiyi.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" flashvars="clipboard=%3C%25%0A%20%20 ......

JSPÖеÄCookieʹÓÃ

Cookie¸ÅÄî:
    CookieµÄ¸ñʽʵ¼ÊÉÏÊÇÒ»¶Î´¿Îı¾ÐÅÏ¢, ÓÉ·þÎñÆ÷Ëæ×ÅÍøÒ³Ò»Æð·¢Ë͵½¿Í»§¶Ë, ²¢±£´æÔÚ¿Í»§¶ËÓ²ÅÌÖÐÖ¸¶¨µÄĿ¼µÄ. ´ó¼Ò¶¼´«ËµCookie»áÔì³ÉÑÏÖصݲȫÍþвʲôµÄ, Æäʵ²»ÊÇÕâô»ØÊÂÇé. ·þÎñÆ÷¶ÁÈ¡CookieµÄʱºò, Ö»Äܹ»¶ÁÈ¡µ½Õâ¸ö·þÎñÆ÷Ïà¹ØµÄÐÅÏ¢. ¶ø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ