1、准备如下几个jar包:
java-core-2.6.jar(这个是fckeditor的核心包!)
imageinfo-1.9.jar
commons-fileupload-1.2.1.jar
commons-io-2.0.jar
2、在web.xml中配置如下:
ConnectorServlet
net.fckeditor.connector.ConnectorServlet
1
ConnectorServlet
/fckeditor/editor/filemanager/connectors/*
3、自定义一些FCKeditor的配置
这里主要是配置一些上传文件类型、目录等信息。
在java-core-2.6.jar中找到net.fckeditor.handlers包下的default.properties,根据它来编写自
定义的FCKeditor配置文件!
自定义的FCKeditor配置文件的名称为fckeditor.properties,放在maven类型项目的src/main/resources下,只要保证编译后此文件在WEB-INF\classes目录下即可!
-----------------------------------------------------------------------------------
自定义的FCKeditor配置文件fckeditor.properties的内容如下:
connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
################################################################################
#(设置自定义的图片上传文件保存路径
# 修改时请参考java-core-2.6.jar的net.fckeditor.handlers包下的default.properties文件)
################################################################################
# base URL path for the userfiles
connector.userFilesPath = /uploads
# base system path on the backend for the userfiles
connector.userFilesAbsolutePath = /uploads
# default resource type paths
connector.resourceType.image.path = /Image
-----------------------------------------------------------------------------------