首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

FCKeditor for Java的配备

2012-11-25 
FCKeditor for Java的配置具体配置步骤:[sizemedium]1、导入相关文件1将FCKeditor的jar包导入到工程的lib

FCKeditor for Java的配置
具体配置步骤:

[size=medium]1、导入相关文件
   1>将FCKeditor的jar包导入到工程的lib目录下FCKeditor-2.3-modify.jar
   2>将FCKeditor.tld文件放置在web-inf的目录下
   3>将FCKeditor文件夹放置在webroot的目录下
2、将如下代码加入到web.xml中

<servlet>    <servlet-name>Connector</servlet-name>    <servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>    <init-param>      <param-name>baseDir</param-name>      <param-value>/UserFiles/</param-value>    </init-param>    <init-param>      <param-name>debug</param-name>      <param-value>true</param-value>    </init-param>    <load-on-startup>1</load-on-startup>  </servlet>  <servlet>    <servlet-name>SimpleUploader</servlet-name>    <servlet-class>com.fredck.FCKeditor.uploader.SimpleUploaderServlet</servlet-class>    <init-param>      <param-name>baseDir</param-name>      <param-value>/UserFiles/</param-value>    </init-param>    <init-param>      <param-name>debug</param-name>      <param-value>false</param-value>    </init-param>    <init-param>      <param-name>enabled</param-name>      <param-value>true</param-value>    </init-param>    <init-param>      <param-name>AllowedExtensionsFile</param-name>      <param-value></param-value>    </init-param>    <init-param>      <param-name>DeniedExtensionsFile</param-name>      <param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>    </init-param>    <init-param>      <param-name>AllowedExtensionsImage</param-name>      <param-value>jpg|gif|jpeg|png|bmp</param-value>    </init-param>    <init-param>      <param-name>DeniedExtensionsImage</param-name>      <param-value></param-value>    </init-param>    <init-param>      <param-name>AllowedExtensionsFlash</param-name>      <param-value>swf|fla</param-value>    </init-param>    <init-param>      <param-name>DeniedExtensionsFlash</param-name>      <param-value></param-value>    </init-param>    <load-on-startup>1</load-on-startup>  </servlet><servlet-mapping>    <servlet-name>Connector</servlet-name>    <url-pattern>/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector    </url-pattern></servlet-mapping><servlet-mapping>    <servlet-name>SimpleUploader</servlet-name>    <url-pattern>/FCKeditor/editor/filemanager/upload/simpleuploader    </url-pattern> </servlet-mapping>

3、在你需要fckeditor的界面中添加下列信息
文件头:<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="f" %>正文:<f:editor width="700" height="450" id="news" basePath='<%=path + "/FCKeditor/"%>'imageBrowserURL='<%=path+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"%>'linkBrowserURL='<%=path+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"%>'flashBrowserURL='<%=path+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"%>'imageUploadURL='<%=path+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"%>'linkUploadURL='<%=path+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"%>'flashUploadURL='<%=path+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash"%>'></f:editor>

哈哈,完成啦!
[/size]

热点排行