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

jspÒ³Ãæ URL´«ÖÐÎIJÎÊýµ½ActionÀïÃæ³öÏÖÂÒÂë

½â¾ö·½·¨£º
µÚÒ»ÖÖ£ºÔÚActionÖÐÓà new String(str.getBytes("ISO8859_1"), "UTF8")£¬½øÐÐתÂ룬ÒòΪ´«µÝµÄʱºò£¬ÖÐÎÄĬÈ˵ÄÊÇISO8859_1
 
µÚ¶þÖÖ£º¿Éͨ¹ýÅäÖÃTOMCATÀ´½â¾ö´ËÎÊÌ⣬¾ßÌå½â¾ö·½·¨ÈçÏ£ºÔÚtomcatµÄserver.xmlÀÕÒµ½<Connector port="8080" useBodyEncodingForURI="true" URIEncoding="utf-8">
ÆäÖÐÊÇÐÞ¸ÄuseBodyEncodingForURI="true" URIEncoding="utf-8" Æä·½·¨ÊÇ·ÀÖ¹ÔÚurlÖгöÏÖÂÒÂë
È»ºóÔÚÿ¸öJspÒ³ÃæÌí¼ÓÈçÏ´úÂë
<%@ page pageEncoding=” utf-8″%>
<%@ page contentType=”text/html;charset= utf-8″%>
<%request.setCharacterEncoding(” utf-8″);%>


Ïà¹ØÎĵµ£º

¡¾×ª¡¿JSP/ServletÖеıàÂë

    Ê×ÏÈ£¬ËµËµJSP/ServletÖеö±àÂëµÄ×÷Óá£
ÔÚJSP/ServletÖÐÖ÷ÒªÓÐÒÔϼ¸¸öµØ·½¿ÉÒÔÉèÖñà Â룬pageEncoding="UTF-8"¡¢contentType="text/html;charset=UTF-8"¡¢request.setCharacterEncoding("UTF-8")ºÍ response.setCharacterEncoding("UTF-8")£¬ÆäÖÐǰÁ½¸ ......

jsp¶ÁÈ¡ÅäÖÃÎļþÂÒÂë½â¾ö

Properties properties = new Properties();
   
    File file = new File(request.getRealPath("/") +"\\WEB-INF\\classes\\configs.properties");
    FileInputStream fiStream = new FileInputStream(file);
    InputStreamRe ......

JSP¶ÔÎļþµÄ²Ù×÷

Ò»¡¢ÔÚJSPÒ³ÃæÖжÁÈ¡±¾µØÎļþÄÚÈÝ£º
<%
    try {
        BufferedReader in = new BufferedReader(new FileReader("D:/test.txt"));
        String file = "";
        String temp = "";
 &n ......

dz̸ÈçºÎɾ³ýJSP±àÒëºóµÄ¿ÕÐÐ


µ±ÄãÔÚ¿Í»§¶ËÓÃview source¿´JSPÉú³ÉµÄ´úÂëʱ£¬»á·¢ÏÖÓкܶà¿ÕÐУ¬ËûÃÇÊÇÓÉ< %...% >ºóµÄ»Ø³µ»»ÐжøÉú³ÉµÄ£¬Ò²¾ÍÊÇ˵ÿһÐÐÓÉ< %...% >°üº¬µÄJSP´úÂëµ½¿Í»§¶Ë¶¼±ä³ÉÒ»¸ö¿ÕÐУ¬ËäÈ»²»Ó°Ïìä¯ÀÀ£¬µ«»¹ÊÇÏ£ÍûÄܰÑËûÃÇɾµô¡£ÕâÀォΪ´ó¼Ò½éÉÜÈçºÎɾ³ýJSP±àÒëºóµÄ¿ÕÐС£
Tomcatɾ³ýJSP±àÒëºóµÄ¿ÕÐа취ÈçÏ£º
1. ......

Ŀǰ×îºÃµÄJSP·ÖÒ³¼¼Êõ

ǰÑÔ
ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬²»¿É±ÜÃâµÄÐèҪʹÓõ½·ÖÒ³µÄ¹¦ÄÜ£¬¿ÉÊÇJDBCµÄ¹æ·¶¶Ô´ËȴûÓкܺõĽâ¾ö¡£¶ÔÓÚÕâ¸öÐèÇóºÜ¶àÅóÓѶ¼ÓÐ×Ô¼ºµÄ½â¾ö·½°¸£¬±ÈÈçʹÓÃVectorµÈ¼¯ºÏÀàÏȱ£´æÈ¡³öµÄÊý¾ÝÔÙ·ÖÒ³¡£µ«ÕâÖÖ·½·¨µÄ¿ÉÓÃÐԺܲÓëJDBC±¾ÉíµÄ½Ó¿ÚÍêÈ«²»Í¬£¬¶Ô²»Í¬ÀàÐ͵Ä×ֶεÄÖ§³ÖÒ²²»ºÃ¡£ÕâÀïÌṩÁËÒ»ÖÖÓëJDBC¼æÈÝÐԷdz£ºÃµÄ·½°¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ