fckeditor是一个很好的在线文本编辑器,它友好的界面,强大的功能,得到了很多使用者的好评,在tomcat底下使用它,觉得挺顺利的,一旦把程序移植到
weblogic底下,就碰到了一个烦人的问题
Error loading "/fckeditor/fckstyles.xml"
Do you want to see more info?
此时就纳闷起来了,这个fckstyles.xml明明在里面,而且也能通过url直接访问到它,却不能加载成功,此时立马想到了第一种解决方案,这段不就是调试
信息吗?跑到fckconfig.js中找到相应位置,注释掉它不就好了啊,但毕竟不是什么良策。
接着就抱着转牛角尖的心态,跑到fckeditor的论坛上面逛了一圈,发现果真有好些人遇到了跟我相似的情况, 却苦于找不到解决方案, 其中一个人的解决
方案给了我一些启发,他分析了产生问题的原因是因为fckstyles.xml没有被ie用contentType:text/xml方式下载,所以导致了不能解析,他是在php底下做
开发的,他直接把fckstyles.xml的第一行改成
<?php header('Content-type: text/xml');?><?php echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"; ?>
我的代码是java的,这种方式先不说可行不,至少对我来说, 是没有任何用处, 但给了我一些启发,所以我的第二种解决方案的核心是:保证fckstyles.xml
能以text/xml方式下载:这次又想到用urlrewrite.xml做一个地址转换,同时在转换的过程中设置一下contentType
<rule>
<from>^/common/fckeditor/xml/([_.0-9a-zA-Z]+).xml$</from>
<to>/common/fckeditor/$1</to>
<set type="content-type">text/xml</set>
</rule>
同时修改
FCKConfig.StylesXmlPath=FCKConfig.EditorPath + 'fckstyles.xml' ;
为
FCKConfig.StylesXmlPath=FCKConfig.EditorPath + 'xml/fckstyles.xml.xml' ;
到此,再跑一下程序, 错位消失,一切ok了
分享到:
相关推荐
已解决FCKeditor在Weblogic下发布Error Loading错误的例子,采用了网上比较流行的"通过虚拟地址解决fckeditor错误的加载/fckeditor/fckstyles.xml”,具体方法可参照:...
/fckstyles.xml /fckeditor_php5.php /fckeditor_php4.php /fckeditor.php /fckeditor.js /fckconfig.js /editor/ fckeditor.php : BasePath为默认Fckeditor的目录,也可以在调用的时候指定. 三、\fckconfig.js 语言...
网上说还有一个东西要下,就是xalan.jar,xml.apache.org是它的网站。 现在开始设置,先到tomcat->webapps里建立一个文件夹叫mysite。把FCKeditor里的/editor和fckconfig.js, fckeditor.js, fckstyles.xml, ...
本文实例讲述了fckeditor部署到weblogic出现xml无法读取及样式不能显示问题的解决方法。分享给大家供大家参考,具体如下: 当部署含有Fckeditor编辑器的应用程序时,在tomcat下什么问题都没有,但当部署到weblogic下...
2.FCKeditor根目录下只保留fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml,其余全部删除 3.将editor/filemanager/upload目录下文件及文件夹清空 4.将/editor/filemanager/browser/default/...
1.FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法 打开editor/filemanager/connectors/aspx/config.ascx修改CheckAuthentication()...
兼容目前的浏览器 里面包含... 根目录下,只保留文件夹editor,文件fckconfig.js、fckeditor.js、fckpackager.xml、fckstyles.xml和fcktemplates.xml。 子目录editor/filemanager/connectors下,只保留文件夹aspx。
删除/FCKeditor/目录下除fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml四个文件以外的所有文件,保留文件夹editor 删除目录/editor/_source, 删除/editor/filemanager/browser/default/connectors...
根目录下,只保留文件夹editor,文件fckconfig.js、fckeditor.js、fckpackager.xml、fckstyles.xml和fcktemplates.xml。 子目录editor/filemanager/connectors下,只保留文件夹aspx。 四.最后一步,配置web.config...
2.FCKeditor根目录下只保留fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml其余全部删除 3.将editor/filemanager/upload目录下文件及文件夹清空. 4.还可以将editor/skins目录下的皮肤文件删除,只...
2.FCKeditor根目录下只保留fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml其余全部删除 3.将editor/filemanager/upload目录下文件及文件夹清空. 4.还可以将editor/skins目录下的皮肤文件删除,只...
删除/FCKeditor/目录下除fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml,fckeditor.php五个文件以外的所有文件 删除目录/editor/_source,_testcases(基本上,所有_开头的文件夹或文件都是可选的)...
│ │ │ │ fckstyles.xml 1.56 KB │ │ │ │ fcktemplates.xml 2.10 KB │ │ │ │ license.txt 24.25 KB │ │ │ └─editor (9 folders, 5 files, 16.61 KB, 1.80 MB in total.) │ │ │...