下载
http://www.fckeditor.net/download
FCKeditor.Java
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511
-1-
copy fckeditor文件夹到项目的webRoot目录下
-2-
添加Jar包
slf4j-simple-1.5.0.jar
slf4j-api-1.5.0.jar
java-core-2.4-beta-1.jar
commons-io-1.3.2.jar
commons-fileupload-1.2.jar
-3-
classes下
fckeditor.properties
内容:
connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
log4j.properties
内容:
log4j.rootLogger=DEBUG, SOCKET
log4j.appender.SOCKET=org.apache.log4j.net.SocketAppender
log4j.appender.SOCKET.RemoteHost=localhost
log4j.appender.SOCKET.Port=4445
log4j.logger.org.apache=WARN
-4-
项目的web.xml
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
net.fckeditor.connector.ConnectorServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/fckeditor/editor/filemanager/connectors/*
</url-pattern>
</servlet-mapping>
-5-
页面中使用
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<form action="" method="post">
<FCK:editor instanceName="EditorDefault">
<jsp:attribute name="value">
内容
</jsp:attribute>
</FCK:editor>
<br />
<input type="submit" value="Submit" />
</form>