JSP³öEXCEl±¨±íÖÐÎÄÃû³ÆÂÒÂë
ÎÒÔÚʹÓÿªÔ´µÄJXL ³öEXCEL±¨±íʱÓöµ½ÕâÑùµÄÎÊÌâ¡£
ÎÒÏë³öµÄÎļþÃû³ÆÊÇÕâÑùµÄ£ºÀý£ºtest_ÀîÇ¿.xls
´úÂëÊÇ ....test_+"UserID"+".xls";
µ«ÊÇ¿ØÖÆ̨ÎÒ¿´µ½µÄÊä³öÃû³ÆЧ¹ûÊÇ£ºtest_µ¥°¶·ï .xls
²»ÖªµÀΪɶ£¿
UserID ÊÇÕâÑùÈ¡µ½µÄ
String UserID = request.getParameter("UserID");
È»ºóÎÒÓà System.out.println(UserID);
¿ØÖÆ̨Êä³öµÄÊÇÕâÑùµÄ£º??°?·?
Ä¿Ç°ÎÒ²»Çå³þUserID´«¹ýÀ´Ö®Ç°µÄ±àÂë¸ñʽ »á²»»á¾ÍÊÇÒòΪ ´«À´¹ýµÃ¸ñʽ¶ÔÎÒÕâ±ßÓÐÓ°Ïì
ËùÒÔÎÒÏÂÃæÓõ½µÄ ±àÂëת»»µÄÓï¾ä²»Æð×÷ÓÃ?
´úÂëÓï¾äÊÇÕâÑùµÄ
String filename = new String(UserID.getBytes("GBK"),"gb2312");
µ«ÊÇSystem.out.println(filename )£»ÕâÑùÊä³öµÄ»¹ÊÇ£º??°?·?
ÕâÀïÓиöÎÊÌ⣬UserID.getBytes("GBK"), Õâ¸öGBKÊÇ´ú±íµÄʲôº¬Ò壿 ºóÃæµÄgb2312ÊÇÎÒÒª±ä»»µÄ¸ñʽÂð£¿
ÎÒÊÇ´Óhtm ͨ¹ýjavaScript Ìøתµ½ Õâ¸öjsp ÎļþÖÐ Íê³É±¨±íÊä³ö
htm µÄ charset="gb2312"
ÔÚmyecplise ÏÂÏîÄ¿µÄ±àÂë¸ñʽ ĬÈÏΪ GBK £¬²Ù×÷ϵͳΪ windows xp ÖÐÎÄ°æ
ÁíÍâÎÒÔÚÍøÒ³ÖÐÒ²ÊÔÁËÒ»ÏÂ
String UserID =¡°ÀîÇ¿¡±£»
String filename = new String(UserID.getBytes("GBK"),"gb2312");
System.out.println(filename )£»
ÕâÑù³öÀ´µÄЧ¹ûÊÇ¿ÉÒ﵀ £»
¶øÇÒ ÏëÊä³öµÄ test_ÀîÇ¿.xls Ò²Êä³ö³É¹¦ÁË£º
Çë¸÷λÅóÓÑ°ïæ ÌáЩ±¦¹ó½¨Ò飡¸ã²»¶®°¡£¡
Ææ¹ÖµÄÎÊÌ⣬¹Ø×¢Ò»ÏÂ..
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
Ò»¸öJSPÒ³Ãæ½ÓÊÕÆäËûÒ³ÃæÌá½»¹ýÀ´µÄFORM±íµ¥£¬µ«ÊÇÒªÇóÖ»½ÓÊÕµ±Ç°Õ¾µã¼°Æä×ÓÕ¾µãÌá½»¹ýÀ´µÄFORM±íµ¥£¬ÆäËûÕ¾µãÌá½»¹ýÀ´µÄ±íµ¥²»½ÓÊÕ£¬Õâ¸öÔõôÉèÖã¿
ÓùýÂËÆ÷
filter
½«µ±Ç°Õ¾µã¼°Æä×ÓÕ¾µã·ÅÒ»¸öĿ¼
È» ......
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
ÇëÎʸ÷λ¸ç¸ç½ã½ã£¬ÈçºÎÔËÓÃÏֳɵÄÄ£°åÀ´ÖÆ×÷ƯÁÁµÄJSPÍøҳѽ,»ØÕßÓзÖ!
×Ô¼º¶¥Ï£¬×ÜÓиßÊÖ°É,ÆÚ´ýÖÐ......
Èç¹ûÖ±½ÓÒýÓýøÈ¥
¿ÉÒÔÖ±½ÓÓÃjspµÄÖ¸ÁҲ¿ÉÒÔÓÃfreemarkÒýÓ㬼ǵøø·Ö
лл¸÷λÁË£¬¿´À´Î ......
µÚÒ»¸ö£ºjsp×ö½Øͼ¼òµ¥£¬»¹ÊÇasp×ö½Øͼ¼òµ¥£¡
µÚ¶þ¸ö£ºÎÒʹÓÃjsp½Øͼ£¬jsp½ØͼÔÚ·þÎñÆ÷¶Ë½Øͼ£¬²»ÊÇÔÚ¿Í»§¶Ë½Øͼ£¬ÎÒÒªµÄÊÇ¿Í»§¶Ë½Øͼ£¡
¾ÍÏ൱ÓëQQ½ØͼһÑù£¬½ØÍêͼ²¢°üͼƬµÄÐÅÏ¢±£´æÔÚÊý¾Ý¿âÖУ¬È»ºóÏÔʾÔÚÒ³Ãæ ......