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

jsp¶ÁÈ¡Êý¾Ý¿âÖÐÎÄÂÒÂëÎÊÌâ

Õâ¸öÎÊÌâÊÇ´ÓÏîÄ¿ÖÐÉè¼ÆÊý¾Ý¿âºÍ²Ù×÷Êý¾Ý¿âµÄÈ˲»Í¬¶øÔì³ÉµÄ¡£ËùÓõÄÊý¾Ý¿â
ÊÇsybase£¬Éè¼Æʱ°ÑÊý¾ÝÀàÐÍÉè¼ÆΪnvarcharÁË£¬Èç¹ûÊÇÖÐÎÄ£¬¶ÁÈ¡³öÀ´¾Í»áµÃ
µ½ÂÒÂë¡£ÎÒÊÔÁ˺ö෽·¨»¹ÊDz»ÐУ¬×îºóÎÞÄΣ¬Ö»ºÃ½«Êý¾ÝÀàÐ͸ÄΪvarcharÁË¡£
ËùÒÔÔÚ´Ë×ܽáÒ»ÏÂÖÐÎÄÂÒÂëÎÊÌâ¡£
Ò»¡¢JSPÓëÒ³Ãæ²ÎÊýÖ®¼äµÄÂÒÂë
       JSP»ñÈ¡Ò³Ãæ²ÎÊýʱһ°ã²ÉÓÃϵͳĬÈϵıàÂ뷽ʽ£¬Èç¹ûÒ³Ãæ²ÎÊýµÄ±àÂë
ÀàÐͺÍϵͳĬÈϵıàÂëÀàÐͲ»Ò»Ö£¬ºÜ¿ÉÄܾͻá³öÏÖÂÒÂë¡£½â¾öÕâÀàÂÒÂëÎÊÌâµÄ
»ù±¾·½·¨ÊÇÔÚÒ³Ãæ»ñÈ¡²ÎÊý֮ǰ£¬Ç¿ÖÆÖ¸¶¨request»ñÈ¡²ÎÊýµÄ±àÂ뷽ʽ£º
request.setCharacterEncoding("GBK")»òrequest.setCharacterEncoding
("gb2312")¡£
Èç¹ûÔÚJSP½«±äÁ¿Êä³öµ½Ò³Ãæʱ³öÏÖÁËÂÒÂ룬¿ÉÒÔͨ¹ýÉèÖÃ
response.setContentType("text/html;charset=GBK")»ò
response.setContentType("text/html;charset=gb2312")½â¾ö¡£
¶þ¡¢JavaÓëÊý¾Ý¿âÖ®¼äµÄÂÒÂë
       ´ó²¿·ÖÊý¾Ý¿â¶¼Ö§³ÖÒÔunicode±àÂ뷽ʽ£¬ËùÒÔ½â¾öJavaÓëÊý¾Ý¿âÖ®¼äµÄ
ÂÒÂëÎÊÌâ±È½ÏÃ÷Öǵķ½Ê½ÊÇÖ±½ÓʹÓÃunicode±àÂëÓëÊý¾Ý¿â½»»¥¡£ºÜ¶àÊý¾Ý¿âÇý¶¯
×Ô¶¯Ö§³Öunicode£¬ÈçMicrosoftµÄSQLServerÇý¶¯¡£ÆäËû´ó²¿·ÖÊý¾Ý¿âÇý¶¯£¬¿ÉÒÔ
ÔÚÇý¶¯µÄurl²ÎÊýÖÐÖ¸¶¨£¬ÈçÈçmmµÄmysqlÇý¶¯£º
jdbc:mysql://localhost/WEBCLDB?useUnicode=true&characterEncoding=GBK¡£
Èý¡¢JavaÓëÎļþ/Á÷Ö®¼äµÄÂÒÂë
       Java¶ÁдÎļþ×î³£ÓõÄÀàÊÇFileInputStream/FileOutputStreamºÍ
FileReader/FileWriter¡£ÆäÖÐFileInputStreamºÍFileOutputStreamÊÇ»ùÓÚ×Ö½Ú
Á÷µÄ£¬³£ÓÃÓÚ¶Áд¶þ½øÖÆÎļþ¡£¶Áд×Ö·ûÎļþ½¨ÒéʹÓûùÓÚ×Ö·ûµÄFileReaderºÍ
FileWriter£¬Ê¡È¥ÁË×Ö½ÚÓë×Ö·ûÖ®¼äµÄת»»¡£µ«ÕâÁ½¸öÀàµÄ¹¹Ô캯ÊýĬÈÏʹÓÃϵ
ͳµÄ±àÂ뷽ʽ£¬Èç¹ûÎļþÄÚÈÝÓëϵͳ±àÂ뷽ʽ²»Ò»Ö£¬¿ÉÄÜ»á³öÏÖÂë¡£     ÔÚÕâ
ÖÖÇé¿öÏ£¬½¨ÒéʹÓÃFileReaderºÍFileWriterµÄ¸¸Àࣺ
InputStreamReader/OutputStreamWriter£¬ËüÃÇÒ²ÊÇ»ùÓÚ×Ö·ûµÄ£¬µ«ÔÚ¹¹Ô캯Êý
ÖпÉÒÔÖ¸¶¨±àÂëÀàÐÍ£ºInputStreamReader(InputStream in, Charset cs) ºÍ
OutputStreamWriter(OutputStream out, Charset cs)¡£
 ×Ö·û£¬×ֽںͱàÂëÖ®¼äµÄ¹Øϵ
1. ±àÂëÎÊÌâµÄÓÉÀ´£¬Ïà¹Ø¸ÅÄîµÄÀí½â
1.1 ×Ö·ûÓë±àÂëµÄ·¢Õ¹
´Ó¼ÆËã»ú¶Ô¶à¹úÓïÑÔµÄÖ§³Ö½Ç¶È¿´£¬´óÖ¿ÉÒÔ·ÖΪÈý¸ö½×¶Î£º
¡¡ ϵͳÄÚÂë


Ïà¹ØÎĵµ£º

JSPÐÂÎÅ·¢²¼ÏµÍ³Ô´Âë androidgo.cn

JSPÐÂÎÅ·¢²¼ÏµÍ³androidÐж¯Íø
´ËÍøÕ¾µÄÑÝʾµØַΪ:http://www.androidgo.cn
²âÊÔÍøÖ·: http://ja00028.j01.netjsp.com
ÏÂÔصØÖ·::http://download.csdn.net/source/1653791
¼¼ÊõʵÏÖ:²ÉÓÃJSTL±êÇ©,»ùÓÚservlet,jdbc¿ª·¢¡£Ê¹ÓÃmysqlÊý¾Ý¿â¡£
Éè¼ÆÓÅÊÆ:Ò»Çм¼ÊõʹÓÃ×îµ×²ãµÄ£¬Ã»ÓÐʹÓÃssh¿ò¼Ü£¬¿ÉÒÔÔÚÈκιúÄÚµÄjs ......

jsp½¨Õ¾Àú³Ì

      Á½ÄêÇ°£¬ÔøÓÐһλǰ±²¶ÔÎÒ˵¹ý£º¿ª·¢Ò»¸öÊôÓÚÄã×Ô¼ºµÄÍøÕ¾£¬È»ºóÿÌ컨һµã¿ÕÏеÄʱ¼äÈ¥¾­ÓªÒ»Ï£¬ÖÕÓÐÒ»Ì죬Äã»á·¢¾õËüÊǷdz£ÓÐÓõġ£¸Õ¿ªÊ¼µÄʱºò£¬ÎÒûÓаÑÕâЩ»°·ÅÔÚÐÄÉÏ£¬ÂýÂýµØ£¬ÎҲŷ¢¾õÕâλǰ±²ËµµÄ»°ÊǺÜÓеÀÀíµÄ¡£¼ÙÉèÁ½ÄêÇ°¿ªÊ¼¾­ÓªÒ»¸öÍøÕ¾£¬Í¨¹ýÕâÁ½ÄêµÄÍƹãºÍÔËÓª£¬Ëµ²»¶¨µ½Ï ......

ÈçºÎÏòÒ»¸öjsp´«µÝÁ½¸öÒÔÉϵIJÎÊý

ÓÐÁ½ÖÖ´«²Î·½Ê½
Ò»¡¢get·½Ê½£º
        ÕâÖÖ·½Ê½½«²ÎÊýдÔÚurlÖУ¬¾ÙÀýÀ´Ëµ£¬Èç¹ûÄ¿±ê´«²ÎÒ³ÃæÊÇtarget.jsp,ÄÇôÔÚurlÀï¿ÉÒÔÕâôд£º
        http://..../target.jsp? <Param1> = <value1> & <Param2> = <value2> &...
    &n ......

JSPдÎļþ´úÂë

<%@ page contentType="text/html; charset=gbk" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.io.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ