ÓÃJFreeChartÔöÇ¿JSP±¨±íµÄÓû§ÌåÑé
JFreeChartÊÇÒ»×鹦ÄÜÇ¿´ó¡¢Áé»îÒ×ÓõÄJava»æͼAPI£¬Ê¹ÓÃËü¿ÉÒÔÉú³É¶àÖÖͨÓÃÐԵı¨±í£¬°üÀ¨Öù״ͼ¡¢±ýͼ¡¢ÇúÏßͼ¡¢¸ÊÌØͼµÈ¡£ËüÄܹ»ÓÃÔÚSwingºÍWebµÈÖÐÖÆ×÷×Ô¶¨ÒåµÄͼ±í»ò±¨±í£¬²¢Çҵõ½¹ã·ºµÄÓ¦Óᣱ¾ÎĽ«Í¨¹ýÒýÁì¶ÁÕßѧϰÔÚJFreeChartÖбýͼ¡¢Öù״ͼºÍÇúÏßͼµÄ½ø½×Ó¦Óã¬À´´ïµ½ÊìÁ·Ê¹ÓÃJFreeChartµÄÄ¿µÄ¡£
Ò»£® ÏÂÔØÓë»·¾³ÅäÖÃ
1. ÏÂÔØJFreeChart
JFreeChartÊÇ¿ª·ÅÔ´´úÂëµÄÃâ·ÑÈí¼þ£¬µ«ÊÇËüµÄÖ§³ÖÎĵµÐèÒª¸¶·Ñ²ÅÄܵõ½¡£ÆäÏÂÔصØַΪ£ºhttp://sourceforge.net/project/showfiles.php?group_id=15494£¬µ±Ç°×îа汾Ϊ1.0.6¡£±ÊÕßÏÂÔصÄÊÇ1.0.6×îа档
˵Ã÷£º1£©sourceĿ¼£ºÎªjfreechartµÄÔ´ÂëĿ¼£»
2£©libĿ¼£ºÎª°üĿ¼£¬ÎÒÃÇÐèÒª¹Ø×¢µÄ°üΪjfreechart-1.0.6.jar¡¢gnujaxp.jarºÍjcommon-1.0.10.jarÕâÈý¸ö°ü£»
3£©¸ùĿ¼ÏµÄjfreechart-1.0.6-demo.jarÊÇÀý×Ó³ÌÐò£¬´ó¼ÒË«»÷ºó¿É¿´µ½ÆäÖÐÓкܶàÀý×ÓµÄÔËÐнá¹û¡£
2. »·¾³ÅäÖÃ
±ÊÕߵĿª·¢»·¾³ÈçÏ£º
JDK£º1.5
MyEclipse£º5.1.1 GA
Tomcat£º5.5.28
ΪÁ˺óÐøµÄ“ÓÃJFreeChart´´½¨»ùÓÚWebµÄͼ±í”µÄÒ»¸öÀý×ÓµÄչʾ£¬ÎÒÃÇÔÚMyEclipseÖд´½¨Ò»¸öÃûΪjfreechartµÄWeb¹¤³Ì¡£½«ÏÂÔصÄJFreeChart1.0.6ÏÂlibĿ¼ÏµÄjar°ü¿½±´µ½WebRoot/WEB-INF/libĿ¼Ï¡£ÁíÍ⻹ÐèÒªÔÚweb.xmlÎļþÖÐÔö¼ÓÈçÏÂÅäÖÃ:
<servlet>
<servlet-name>DisplayChart</servlet-name>
<servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DisplayChart</servlet-name>
<url-pattern>/DisplayChart</url-pattern>
</servlet-mapping>
¶þ£®
Ïà¹ØÎĵµ£º
Ç°ÑÔ
ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬²»¿É±ÜÃâµÄÐèҪʹÓõ½·ÖÒ³µÄ¹¦ÄÜ£¬¿ÉÊÇJDBCµÄ¹æ·¶¶Ô´ËȴûÓкܺõĽâ¾ö¡£¶ÔÓÚÕâ¸öÐèÇóºÜ¶àÅóÓѶ¼ÓÐ×Ô¼ºµÄ½â¾ö·½°¸£¬±ÈÈçʹÓÃVectorµÈ¼¯ºÏÀàÏȱ£´æÈ¡³öµÄÊý¾ÝÔÙ·ÖÒ³¡£µ«ÕâÖÖ·½·¨µÄ¿ÉÓÃÐԺܲÓëJDBC±¾ÉíµÄ½Ó¿ÚÍêÈ«²»Í¬£¬¶Ô²»Í¬ÀàÐ͵Ä×ֶεÄÖ§³ÖÒ²²»ºÃ¡£ÕâÀïÌṩÁËÒ»ÖÖÓëJDBC¼æÈÝÐԷdz£ºÃµÄ·½°¸ ......
СµÜ×î½ü¹«Ë¾×öÒ»¸ö±à¼Æ÷£¬×îºóÑ¡ÔñÓÃappletС³ÌÐòǶÈëjsp ÖÐ
Ï൱ÓÚÒ»¸ö¿ØÖÆ£¬×ܽá·ÖÏíһϣº
Ö÷ÒªÅöµ½ÒÔÏÂÎÊÌ⣺
1£¬´«²ÎÊýÎÊÌ⣺
applet-->jsp:
<applet code="rubikApp.class" archive="rubik.jar" width="300" height="300">
<param name="beta" ......
JavaBeanµÄ×÷ÓÃÊÇ·â×°Êý¾ÝµÄ
Ìص㣺Õâ¸öjavaÀà±ØÐë¾ßÓÐÒ»¸öÎ޲εĹ¹Ô캯Êý£¬ÊôÐÔ±ØÐë˽Óл¯£¬ÊôÐÔ±ØÐëͨ¹ýpublic·½·¨¸øÆäËû³ÌÐòµ÷ÓÃ
ÆäËü³ÌÐò¿ÉÒÔͨ¹ý·´Éä¼¼ÊõʵÀý»¯JavaBean¶ÔÏ󣬲¢ÇÒͨ¹ý·´ÉäÄÇЩ×ñÊØÃüÃû¹æ·¶µÄ·½·¨£¬´Ó¶ø»ñÖªJavaBeanµÄÊôÐÔ£¬½ø¶øµ÷ÓÃÆäÊôÐÔ±£´æÊý¾Ý¡£
³ÉÔ±ÓëÊôÐÔµÄÇø±ð£ºÀà³ÉԱûÓÐget,set·½·¨£¬Àൠ......
ÔÚServlet/JSPѧϰ±Ê¼Ç(1)-tomcatºÍeclipseµÄ°²×°ÖУ¬ÎÒ½éÉÜÁËeclipseºÍtomcatPluginµÄ°²×°ºÍÅäÖ÷½·¨¡£µ«½ñÌì·¢ÏÖ£¬Ê¹ÓÃtomcatPlugin´´½¨ÏîĿʱ£¬²»»á×Ô¶¯Éú³Éweb.xml£¬ÐèÒªÊÖ¹¤±à¼£¬Õâ¶àÉÙÓÐЩ²»·½±ã¡££¨¹ØÓÚweb.xmlµÄ¼òµ¥½éÉܲο¼ÕâÀï¡££©
ʵ¼ÊÉÏ£¬¿ª·¢ºÍµ÷ÊÔServlet/JSP³ÌÐòʱ£¬Ò»¸ö½Ð×öLombozµÄ²å¼þ¸üΪǿ´ó¡¢¸üºÃÓà ......