ÔÚJSPÖÐÅäÖÃFCKeditor 2.6.4
1.FCKeditor ½éÉÜ
FCKeditor Õâ¸ö¿ªÔ´µÄHTML Îı¾±à¼Æ÷¿ÉÒÔÈÃweb ³ÌÐòÓµÓÐÈçMS Word ÕâÑùÇ¿´óµÄ±à¼¹¦ÄÜ£¬.FCKeditor Ö§³Öµ±Ç°Á÷ÐеÄä¯ÀÀÆ÷¡£
2£®×¼±¸¹¤×÷£º
»·¾³£ºwinddows XP¡¢tomcat6.0¡¢JDK1.6
ÏÂÔØ£º
1)£ºFCKeditor_2.6.4.zip
µØÖ·£ºhttp://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.4.zip
2)£ºfckeditor-java-2.4.1-bin.zip (JAVAÖ§³Ö°ü)µØÖ·http://nchc.dl.sourceforge.net/sourceforge/fckeditor/fckeditor-java-2.4.1-bin.zip
3)£ºslf4j-1.5.2.zip µØÖ· £ºhttp://www.slf4j.org/dist/slf4j-1.5.2.zip
3.°²×°£º
ÏÂÃæÒÔjspΪÀý£º
·Ö±ð½âѹ֮ºó£¬ÎÒÃÇ¿ÉÒԵõ½Ò»¸öfckeditorºÍfckeditor-java-2.4.1Á½¸öÎļþ¼Ð¡£fckeditorÎļþ¼ÐÏÂÊÇÐèÒªµ÷ÓõÄÒ³ÃæºÍjsÎļþµÈµÈ£¬Óи÷ÖÖ°æ±¾£¬ÎÞËùνÀ²£¬ÎÒÃÇÖ®ÐèÒªjsp¾Í¹»ÁË¡£½«Îļþ¼ÓÈ«²¿¸´ÖƵ½¹¤³ÌĿ¼Ïµȴýµ÷Óü´¿É¡£
×¢Ò⣺ÓеãÂé·³µÄÊǵ¼°üµÄÎÊÌâ¡£ÎÒÃÇÒ»¹²ÐèÒª5¸ö°ü£ºcommons-fileupload-1.2.1.jar£¬commons-io-1.3.2.jar£¬fckeditor-java-core-2.4.1.jar£¬slf4j-api-1.5.6.jar£¬slf4j-simple-1.5.6.jar»òslf4j-jdk14-1.5.6.jar¡£
ÉÏÃæÇ°Ëĸö°ü¶¼¿ÉÒÔÔÚfckeditor-java-2.4.1Îļþ¼ÐÏÂÃæÕÒµ½£¬µ«ÊǵÚÎå¸öÈ´ÒªÁíÍâÈ¥ÕÒ£¬ÕâµãÎҷdz£²»Àí½â£¬ÎªÊ²Ã´²»·ÅÔÚÒ»Æð¡£
Èç¹ûûÓеĻ°±àÒëʱ¾Í»á³öÏÖÈçÏ´íÎóÐÅÏ¢£º
ÑÏÖØ: Servlet /fckeditorDemo threw load() exception
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
µ±È»°æ±¾»òÐí²»Í¬£¬ÒÔÉϵİ汾ÊǽØÖ¹2009-02-4µÄ×îа汾¡£Èç¹ûÏëÒª×îа汾£¬¿ÉÒÔÔÚslf4jµÄ¹ÙÍøhttp://www.slf4j.org/download.htmlϵ½¡£µ«ÊÇҪעÒ⣬½ØÖ¹µ½2009-2-4£¬slf4j¹Ù·½×îа汾ÊÇ1.5.6£¬µ«ÊÇfckeditorÌṩµÄslf4j-apiÈ´ÊÇ1.5.2°æ±¾£¬Èç¹ûÁ½¸ö°æ±¾²»Ò»ÑùµÄ»°£¬Ä㽫»áÔÚ¿ØÖÆ̨¿´µ½ÈçϵÄÏûÏ¢£º
ÑÏÖØ: Servlet /Java threw load() exception
java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
org.slf4j.LoggerFactory
ËùÒÔǧÍòҪעÒâ°æ±¾Ò»ÖÂÎÊÌâ¡£Èç¹ûÄãʵÔÚ¾õµÃÏÂÔغÜÂé·³£¬ÄǾ͵½ÕâÀïÏÂÔØ°É£ºhttp://www.slf4j.org/download.html
4.ÅäÖÃ
1)ÔÚ¹¤³ÌĿ¼src/ÏÂн¨Ò»¸öÎļþfckeditor.properties£¬Ìí¼ÓÄÚÈÝ£º
connector.userFilesPath=UploadFile
connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
ÆäÖеÚÒ»ÐÐΪÖØж¨ÒåÉÏ´«µÄÎļþ¼
Ïà¹ØÎĵµ£º
Ò»¸öajaxÇëÇóÒ»¸öjspÎļþ£¬²Ù×÷³É¹¦,jspÎļþout.println("1");µ«ÊÇÿ´Î³É¹¦ºóxmlHttp.responseText=='1'×ÜÊÇΪfalse£¬
ÓÃencodeURIComponent¿´xmlHttp.responseText£¬·¢ÏÖ×îºó¶àÁË%0A%0D£¬°Ù¶ÈһϠÓÃÀ´ÊÇ»»ÐУ¬
jspÎļþÖеÄout.println……°ÑlnÈ¥µôÔÙ´Î±È½Ï ³É¹¦ = =¡ ......
1¡¢forward ºÍredirectµÄÇø±ð
´ð£ºforwardÊÇ·þÎñÆ÷ÇëÇó×ÊÔ´£¬·þÎñÆ÷Ö±½Ó·ÃÎÊÄ¿±êµØÖ·µÄURL£¬°ÑÄǸöURLµÄÏìÓ¦ÄÚÈݶÁÈ¡¹ýÀ´£¬È»ºó°ÑÕâЩÄÚÈÝÔÙ·¢¸øä¯ÀÀÆ÷£¬ä¯ÀÀÆ÷¸ù±¾²»ÖªµÀ·þÎñÆ÷·¢Ë͵ÄÄÚÈÝÊÇ´ÓÄĶùÀ´µÄ£¬ËùÒÔËüµÄµØÖ·À¸Öл¹ÊÇÔÀ´µÄµØÖ·¡£
redirect¾ÍÊÇ·þÎñ¶Ë¸ù¾ÝÂß¼,·¢ËÍÒ»¸ö״̬Âë,¸æËßä ......
£¨1£©Ö±½ÓÔÚURLÇëÇóºóÌí¼Ó
¡¡¡¡ È磺<a href="thexuan.jsp?action=transparams&detail=directe")Ö±½Ó´«µÝ²ÎÊý/a>
¡¡¡¡ ÌرðµÄÔÚʹÓÃresponse.sendRedirect×öÒ³ÃæתÏòµÄʱºò£¬Ò²¿ÉÒÔÓÃÈçÏ´úÂ룺
¡¡¡¡ response.sendRedirect("thexuan.jsp?action=transparams&de ......
½ñÌìÔÚѧϰjspÖÐÊý¾Ý¿âµÄʹÓÃʱ£¬Óöµ½Ò»¸öºÜÆæ¹ÖµÄÇé¿ö£¨ÖÁÉÙÏÖÔÚ¿´À´Êǵģ©¡£jspÖÐÁ¬½ÓmysqlÊý¾Ý¿â£¬¿ªÆômysqlÊý¾Ý¿âºó£¬ÔÚjspÒ³ÃæÖÐǶÈëµÄjavaÁ¬½ÓmysqlÊý¾Ý¿âµÄÄǼ¸¾ä´úÂë¡£ºÃÏñ Class.forName("org.gjt.mm.mysql.Driver");ûÆðµ½×÷Óã¬Ö»ÐèÒªConnection con=DriverManager.getConnection("jdbc:mysql://localhost/test? ......