在这里总结一下今天使用Fckediter 和在整合Struct2中遇到问题 这里如果直接使用servlet开发不会遇到这些问题
其他环境搭建这里不再阐述
因为struct2中有一些过滤器于FCK中存在冲突 所有我们在web.xml中配置如下
<!-- fckEditor 重载了一下fck的ConnectorServlet 为了解决上传中文图片乱码问题-->
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
com.buy.ckediter.ConnectorServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/userfiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
<!--
<url-pattern>
/fckeditor/editor/filemanager/connectors/*
</url-pattern>
-->
<url-pattern>/fckeditor/connector</url-pattern>
</servlet-mapping>
<!-- fckEditor -->
下面是防止struct2和fck过滤器的冲突
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<!---防止冲突主要是下面配置-->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.do</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
其他的fck配置网上参见 。。。。。。。good luck !!!!
其他环境搭建这里不再阐述
因为struct2中有一些过滤器于FCK中存在冲突 所有我们在web.xml中配置如下
<!-- fckEditor 重载了一下fck的ConnectorServlet 为了解决上传中文图片乱码问题-->
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
com.buy.ckediter.ConnectorServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/userfiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
<!--
<url-pattern>
/fckeditor/editor/filemanager/connectors/*
</url-pattern>
-->
<url-pattern>/fckeditor/connector</url-pattern>
</servlet-mapping>
<!-- fckEditor -->
下面是防止struct2和fck过滤器的冲突
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<!---防止冲突主要是下面配置-->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.do</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
其他的fck配置网上参见 。。。。。。。good luck !!!!