struts2中运用Fckeditor 2.6.5 + fckeditor-java-2.5-bin
struts2中使用Fckeditor 2.6.5 + fckeditor-java-2.5-bin 相关中文问题和上传路径问题,请看下面的文章 Fckeditor 2.6.5 中文问题和fckeditor-java-2.5-bin 文件上传路径动态生成 改为:仅处理.action或.jsp请求 备注:以上配置文件的更改会造成Struts2 标签在页面中不显示 http://feicer.iteye.com/blog/576209 相关中文问题和上传路径问题,请看下面的文章 Fckeditor 2.6.5 中文问题和fckeditor-java-2.5-bin 文件上传路径动态生成
下载地址如下:
Fckeditor 2.6.5 :FCKeditor_2.6.5.zip
http://sourceforge.net/projects/fckeditor/files/FCKeditor/
http://sourceforge.net/projects/fckeditor/files/FCKeditor.Java/2.5/
//好像这个servlet不配置也可以的
1)解压主文件,放到项目的WebRoot目录下;
2)解压fckeditor-java-2.5-bin.zip,从lib中找到commons-fileupload-1.2.1.jar、commons-io-1.3.2.jar、slf4j-api-1.5.8.jar
给FckEditor瘦身
删除fckeditor目录下面所有以“_”开头的文件或者文件夹,像"_samples"、"_documentation.html“等
删除fckeditor目录下面除了,fckconfig.js fckpackage.xml fckstyles.xml fcktemplates.xml外的所有文件,当然要保留editor文件夹
删除fckeditor/editor/lang目录下面除了en.js、 zh-cn.js外的所有文件
删除fckeditor\editor\filemanager目录下面的connectors文件夹
删除editor\skins目录下面除了default下面的文件夹,这个里面是皮肤,共有三种,可以在fckconfig.js里面设置。
添加应用:
在需要应用的jsp页面添加taglib:
然后是引用入编辑框:
注:
让Struts2仅处理*.action的请求。修改配置文件web.xml:
将Struts2处理所有web请求的过滤器配置
应该在web.xml文件中加入以下配置: