由于自己参考《通过虚拟地址解决fckeditor错误的加载/fckeditor/fckstyles.xml 》这篇文章解决FCKeditor在weblogic9.1下部署的错误加载问题。但还是在自己动手中出现了错误。
1。在原作者的文章中对urlrewrite.xml的内容是这样填写的
<
rule
>
< from > ^/fckeditor/xml/([_.0-9a-zA-Z]+).xml$ </ from >
< to > /fckeditor/$1 </ to >
< set type ="content-type" > text/xml </ set >
</ rule >
< from > ^/fckeditor/xml/([_.0-9a-zA-Z]+).xml$ </ from >
< to > /fckeditor/$1 </ to >
< set type ="content-type" > text/xml </ set >
</ rule >
但是我这样填写还是错误,最后寻找原因是因为我的FCKeditor没有独立解压到项目跟目录下,而是将fckeditor下的fckconfig.js,fckeditor.js,fckstyles.xml,fcktemplates.xml,editor文件夹 拷贝到项目的web跟目录下;将FCKeditor-2.3/web/WEB-INF/lib下的2个jar文件拷贝到项目的web/WEB-INF/lib下。不同点就是原作者是将fckeditor解压到项目跟目录下的。所以我的urlrewrite.xml代码如下修改
<
rule
>
< note >
The rule means that requests to /test/status/ will be redirected to /rewrite-status
the url will be rewritten.
</ note >
< from > ^/xml/([_.0-9a-zA-Z]+).xml$ </ from >
< to > /$1 </ to >
< set type ="content-type" > text/xml </ set >
</ rule >
< note >
The rule means that requests to /test/status/ will be redirected to /rewrite-status
the url will be rewritten.
</ note >
< from > ^/xml/([_.0-9a-zA-Z]+).xml$ </ from >
< to > /$1 </ to >
< set type ="content-type" > text/xml </ set >
</ rule >
其余都和原作者做法相同。这样问题就解决了。
2.现在对这个还是有点不明白的地方,希望能够有朋友指教。
在urlrewrite.xml的<from>中是^/xml/([_.0-9a-zA-Z]+).xml$ ,为什么要加xml这个目录?
如果该文章对您有所帮助,请帮忙点击:http://www.ayiou.com/