自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

在JSP環(huán)境中配置使用fckeditor詳細(xì)講解

開發(fā) 后端
本文敘述在JSP環(huán)境中配置使用fckeditor詳細(xì)講解,以及介紹其它問題和安全問題。

FCKeditor是sourceforge.net上面的一個(gè)開源項(xiàng)目,主要是實(shí)現(xiàn)在線網(wǎng)頁編輯器的功能,可以讓web程序擁有如MS Word這樣強(qiáng)大的編輯功能。官方網(wǎng)站為http://www.fckeditor.net ,在服務(wù)器端支持ASP.Net、ASP、ClodFusion、PHP、Java等語言,并且支持IE 5+、Mozilla 、Netscape等主流瀏覽器。

首先在官方網(wǎng)站下載fckeditor,注意有兩個(gè)包,一個(gè)是主文件,一個(gè)是jsp整合包的。
1、解壓FCKeditor_2.2.zip,(FCKeditor主文件),將FCKeditor目錄復(fù)制到網(wǎng)站根目錄下,
2、解壓FCKeditor-2.3.zip,(jsp,FCKeditor整合包),作用:This is the JSP Integration Pack for using FCKeditor inside a java server page without the complexity of using a Java scriptlets or the javascript api.
3、將FCKeditor-2.3/web/WEB-INF/web.xml中的兩個(gè)servlet,servlet-mapping定義復(fù)制到自已項(xiàng)目的web.xml文件中

  1. <servlet-mapping>   
  2. <servlet-name>Connectorservlet-name>   
  3. <url-pattern> 
  4. /editor/filemanager/browser/default/connectors/jsp/connector  
  5. url-pattern>   
  6. servlet-mapping>   
  7. <servlet-mapping>   
  8. <servlet-name>SimpleUploaderservlet-name>   
  9. <url-pattern>/editor/filemanager/upload/simpleuploaderurl-pattern>   
  10. servlet-mapping> 

修改為:

  1. <servlet-mapping>   
  2. <servlet-name>Connectorservlet-name>   
  3. <url-pattern> 
  4. /FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector  
  5. url-pattern>   
  6. servlet-mapping>   
  7. <servlet-mapping>   
  8. <servlet-name>SimpleUploaderservlet-name>   
  9. <url-pattern>/FCKeditor/editor/filemanager/upload/simpleuploaderurl-pattern>   
  10. servlet-mapping> 


4、將FCKeditor-2.3/web/WEB-INF/lib目錄下文件復(fù)制到自已項(xiàng)目的lib文件夾中
5、在需使用FCKeditor的jsp界面中加入:

  1. // 文件開頭處加入   
  2. <%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %>   
  3. //要使用的地方加入   
  4. <FCK:editor id="content" basePath="/FCKeditor/"   
  5. imageBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?  
  6. Type=Image&Connector=connectors/jsp/connector"   
  7. linkBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?  
  8. Connector=connectors/jsp/connector"   
  9. flashBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?  
  10. Type=Flash&Connector=connectors/jsp/connector"   
  11. imageUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"   
  12. linkUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"   
  13. flashUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">   
  14. this is default content :)   
  15. FCK:editor> 

啟動(dòng)服務(wù)器測試。。。。成功后,來給FCKeditor瘦瘦身.
1、將FCKeditor目錄下及子目錄下所有以”_”下劃線開頭的文件夾刪除
2.FCKeditor根目錄下只保留fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml其余全部刪除
3.將editor/filemanager/upload目錄下文件及文件夾清空.
4.還可以將editor/skins目錄下的皮膚文件刪除,只留下default一套皮膚(如果你不需要換皮膚的話)
5.還可以將editor/lang目錄下文件刪除,只保留en.js, fcklanguagemanager.js, zh-cn.js, zh.js文件(英文,簡體中文,繁體中文一般應(yīng)該夠用了:) )

完成,現(xiàn)在看是不是清爽了很多?

其它問題:

在struts+spring+hibernate中使用,上傳圖像功能中可能會出現(xiàn)報(bào):
The output format must have a ‘content-handler’ property!
錯(cuò)的情況,將WEB-INF/lib目錄下xalan*.jar刪除試試

安全問題:

假如在前臺讓普通用戶也能使用FCKEditor,要注意相關(guān)安全問題,在前臺使用時(shí),不要使用默認(rèn)的ToolBar,要將添加圖像,flash,圖像域按鈕去掉,在fckconfig.js中大約78行配置那些數(shù)組中的值就像當(dāng)于界面上的一個(gè)功能,你可以強(qiáng)行把每組值試出來代表什么。

【編輯推薦】

  1. JSP實(shí)現(xiàn)JDOM處理數(shù)據(jù)庫到XML轉(zhuǎn)換的應(yīng)用
  2. 在JSP編程中Application的使用方法詳解
  3. Ajax和JSF使用Rational Application Developer V7輕松實(shí)現(xiàn)Web應(yīng)用程序
  4. JSF技術(shù)詳細(xì)介紹
  5. 使用Acegi保護(hù)JSF應(yīng)用程序
責(zé)任編輯:佚名 來源: builder
相關(guān)推薦

2009-09-10 09:48:15

JSP使用FCKedi

2009-07-01 10:12:40

JSP環(huán)境配置JSP引擎

2009-06-23 09:33:20

FCKEditorJSFJSP

2009-02-25 10:55:29

FCKeditor控件JSP

2011-06-28 09:20:41

Qt Qt 4.3.2 Visual Stu

2011-05-18 11:23:47

JSP動(dòng)態(tài)網(wǎng)站

2009-07-03 16:21:43

2009-06-16 15:20:48

ApplicationJSP程序

2009-07-02 15:31:49

JSP標(biāo)簽

2009-06-30 10:40:25

JSP自定義標(biāo)簽

2009-07-03 16:46:07

JSP環(huán)境變量

2011-07-08 16:54:39

JspCookies

2011-07-06 10:32:07

Xcode

2009-08-03 10:11:44

JSP開發(fā)環(huán)境配置

2011-07-06 10:46:33

Xcode

2011-08-25 15:10:49

LUAWindows環(huán)境配置

2013-01-10 15:36:44

Android開發(fā)組件Intent

2009-04-03 08:21:37

AndroidGoogle移動(dòng)OS

2009-07-03 16:45:25

JSP實(shí)用教程

2009-06-08 17:50:00

javalinuxjsp
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號