1.刚开始的时候以为跟struts整合差不多,但事实上按部就班的时候会出现一系列的问题。
一般情况下会遇到这些问题:
《 解决方法:此错误是由于struts2的拦截器拦截action时与fckeditor的servlet有冲突导致的。只要配置一下web.xml中struts2的映射就行。我的配置如下:
<filter><br><filter-name>struts2</filter-name><br><filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class><br></filter>
<filter-mapping><br><filter-name>struts2</filter-name><br><url-pattern>*.action</url-pattern><br></filter-mapping>
<filter-mapping><br><filter-name>struts2</filter-name><br><url-pattern>/struts/*</url-pattern><br></filter-mapping>
<servlet><br><servlet-name>ConnectorServlet</servlet-name><br><servlet-class><br> net.fckeditor.connector.ConnectorServlet <br></servlet-class><br><load-on-startup>1</load-on-startup><br></servlet>
<servlet-mapping><br><servlet-name>ConnectorServlet</servlet-name><br><!-- Do not wrap this line otherwise Glassfish will fail to load this file --><br><url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern><br></servlet-mapping>
---------解决完问题后,我们就开始进一步配置,其实大部分工作已经完成。只需要从官方给的例子中,吧lib里面的jar包放到自己的项目中,这样基本上就已经完成了配置。当然了,可以压缩一下fckeditor的大小,建议直接把官方的例子内的考入项目更目录即可,那已经是很精简的版本了,当然还可以把目录下的_开头的都删掉,以节约空间。
推荐一套fckeditor工具栏:
FCKConfig.ToolbarSets["self"] = [
['Cut','Copy','Paste','PasteText','PasteWord','-',
'Find','Replace','-','SelectAll','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough',
'OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Image','Table','Smiley','PageBreak'],['TextColor','BGColor'],
['FontName','FontSize']
//['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
] ;
分享到:
相关推荐
Struts2与FCKeditor的整合.doc
struts2,fckeditor解决上传图片冲突
解决了在struts2下试用fckeditor上传图片出错
FCKEditor与Struts2整合.doc FCKEditor与Struts2整合.doc
struts2中配置FCKeditor,实现强大的编辑功能
Fckeditor完美结合Struts2,可以在struts2 的项目中使用Fckeditor的图片上传,等很多功能
struts和fckeditor整合完整版调试无误,不过上传的文件不支持中文名称,抱歉!这个问题我解决不了,如何您下载之后能解决的话,希望您能给我一个连接
该文件是整合了struts2的FCKEditor插件。
fckeditor批量图片上传
这是小弟自己写的一个实际项目,是一个关于信息发布的实例..有助于学习struts2+fckeditor的朋友学习..
jsp下fckeditor配置.实现图片上传功能 说明+实例 表单提交后,请到tomcat中浏览相应的文件夹,图片已上传
struts2下的FCKeditor插件,解决了兼容问题,例子见本人上传的其他资源
这图片上传为定宽,定高上传。修改文件径fckeditor--ditor--dialog--fck_image中的fck_image.js、fckconfig.js等等花时间琢磨一下. 其中还有我自己改写的公共类,带"image"标识的文件,希望大家都详细看看,改过的...
FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览
主要用AjaxPro将Fckeditor编辑器中的HTML代码发送到后台用Regex查找图片用WebClient下载图片,替换图片链接,回发信息,替换Fckeditor编辑器中的代码来实现将复制到编辑器中的图片下载到本地文件夹中。
自定义文本编译器FCKeditor-2.3
fckeditor集成远程图片上传插件,为了方便应用,插件作者已经做了升级并集成到fckeditor
把fckfinder 整合进 fckeditor 让最新版fckeditor具有上传资源功能~
这个编辑器相对于fckeditor来说相对比较好因为这个在于struts2整合的时候不用再去重写过滤文件了