配置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
內(nèi)容:
connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
log4j.properties
內(nèi)容:
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)轉(zhuǎn)載于:https://www.cnblogs.com/java20130725/p/3215656.html
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結
以上是生活随笔為你收集整理的配置FCKeditor_2.6.3+fckeditor-java-2.4的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 男子用捕鼠贴设天罗地网捉老鼠:结果反被调
- 下一篇: 中国互联网大佬江湖拼什么?拼财力拼出身拼