配置FCKeditor_2.6.3+fckeditor-java-2.4


下载

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="Default" value=" ">
</FCK:editor>
<br />
<input type="submit" value="Submit" />
</form>

上面 <FCK:editor instanceName="Default" value=" ">
</FCK:editor>中value值必须有空格!

否则就会有异常:

org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.NullPointerException net.fckeditor.FCKeditor.createHtml(FCKeditor.java:238) net.fckeditor.FCKeditor.toString(FCKeditor.java:223) java.lang.String.valueOf(Unknown Source)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值