CKeditor与CKfinder整合成功,但是加上struts2 spring配置后(即在web.xml文件中加入<!-- struts2 -->之后的内容),ckfinder.html显示正常,但是点击上传之后就没有反应了(即图片中点击上传选定文件后),文件没有上传成功,谁遇到过这种情况,请指教 以下为web.xml文件配置 
<!-- ckfinder --> 
<servlet> 
<servlet-name>ConnectorServlet</servlet-name> 
<servlet-class>com.ckfinder.connector.ConnectorServlet</servlet-class> 
<init-param> 
<param-name>XMLConfig</param-name> 
<param-value>/WEB-INF/config.xml</param-value> 
</init-param> 
<init-param> 
<param-name>debug</param-name> 
<param-value>false</param-value> 
</init-param> 
<load-on-startup>1</load-on-startup> 
</servlet> 
<servlet-mapping> 
<servlet-name>ConnectorServlet</servlet-name> 
<url-pattern> 
/ckfinder/core/connector/java/connector.java 
</url-pattern> 
</servlet-mapping> 
<session-config> 
<session-timeout>10</session-timeout> 
</session-config> 
<!--ckeditor  --> 
<servlet> 
<description>This is the description of my J2EE component</description> 
<display-name>This is the display name of my J2EE component</display-name> 
<servlet-name>Editor</servlet-name> 
<servlet-class>com.ckeditor.Editor</servlet-class> 
</servlet> 
<servlet-mapping> 
<servlet-name>Editor</servlet-name> 
<url-pattern>/servlet/Editor</url-pattern> 
</servlet-mapping>
  <!-- struts2 --> 
<filter> 
<filter-name>struts2</filter-name> 
<filter-class> 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 
</filter-class> 
</filter> 
<filter-mapping> 
<filter-name>struts2</filter-name> 
<url-pattern>/*</url-pattern> 
</filter-mapping> <!-- spring --> 
<listener> 
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
</listener>

解决方案 »

  1.   

    查过资料,是struts2框架过滤了servlet请求<filter-mapping> 
    <filter-name>struts2</filter-name> 
    <url-pattern>/*</url-pattern> 
    </filter-mapping> 改为
    <filter-mapping> 
    <filter-name>struts2</filter-name> 
    <url-pattern>*.action</url-pattern> 
    </filter-mapping> 这样就可以了
    可是问题又来了,如果jsp中使用了Struts标签库,还是出错(jsp页面无法正常运行),有人说添加下面配置
    <filter-mapping> 
    <filter-name>struts2</filter-name> 
    <url-pattern>*.jsp</url-pattern> 
    </filter-mapping>
    错误是没有了(jsp页面能够出来),但我用的datetimepicker还是显示不出来没人顶,我自己写,没得办法了
      

  2.   

    怎样在struts2框架中定义servlet?求解
      

  3.   

    有人说在struts.xml中添加 <constant name="struts.action.excludePattern" value="/ckfinder/*"/>
    但是好像没啥作用
    求高手过来解答