1. 加压两个压缩文件,把fckeditor放入root目录下,fck改名大写,删掉sample文件夹.
2.并把ECKeditor-2.3.jar 和 commons-fileupload.jar拷贝到 项目\WebContent\WEB-INF\lib目录下
3.把 FCKeditor.tld拷贝到项目\WebContent\WEB-INF下
4.在web.xml里添加如下代码
代码
5.在需要调用的页面
先导入:
代码
- <%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %>
并在需要调用的地方输入:
代码
- <form action="jsp2.jsp" method="post">
<FCK:editor id="content" width="100%" height="320" fontNames="宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana"
imageBrowserURL="/FckTest/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="/FckTest/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
flashBrowserURL="/FckTest/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="/FckTest/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="/FckTest/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="/FckTest/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash" >
</FCK:editor>
<input type="submit" value="aaaaaaaaaaaaaaaaa">
</form>
--------------
最后加过滤器
上传文件名乱码,修改SimpleUploaderServlet此类