当前位置: 代码迷 >> J2EE >> ckeditor ckfinder 整合后浏览服务器出错,如何解决
  详细解决方案

ckeditor ckfinder 整合后浏览服务器出错,如何解决

热度:718   发布时间:2016-04-21 23:23:17.0
ckeditor ckfinder 整合后浏览服务器出错,怎么解决
ckeditor ckfinder 整合后浏览服务器出错,怎么解决?用的spring

------解决方案--------------------
404错误么?
找不到正确的路径名
那就是你的web.xml有问题呗
------解决方案--------------------
你的配置有问题,ckfinder要配置上传和访问文件的路径,设置的不对就会出现那个问题
------解决方案--------------------
在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>

<filter>
<filter-name>FileUploadFilter</filter-name>
<filter-class>com.ckfinder.connector.FileUploadFilter</filter-class>
<init-param>
<param-name>sessionCookieName</param-name>
<param-value>JSESSIONID</param-value>
</init-param>
<init-param>
<param-name>sessionParameterName</param-name>
<param-value>jsessionid</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>FileUploadFilter</filter-name>
<url-pattern>/ckfinder/core/connector/java/connector.java</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>10</session-timeout>
</session-config>




config.xml文件

<config>
<enabled>true</enabled>
<baseDir></baseDir>
<baseURL>/CKEditor_Finder/userfiles/</baseURL>
<licenseKey></licenseKey>
<licenseName></licenseName>
<imgWidth>1600</imgWidth>
<imgHeight>1200</imgHeight>
<imgQuality>80</imgQuality>
<uriEncoding>UTF-8</uriEncoding>
<forceASCII>false</forceASCII>
<userRoleSessionVar>CKFinder_UserRole</userRoleSessionVar>
<checkDoubleExtension>true</checkDoubleExtension>
<checkSizeAfterScaling>true</checkSizeAfterScaling>
<secureImageUploads>true</secureImageUploads>
<htmlExtensions>html,htm,xml,js</htmlExtensions>
<hideFolders>
<folder>.svn</folder>
<folder>CVS</folder>
</hideFolders>
<hideFiles>
<file>.*</file>
</hideFiles>
<defaultResourceTypes></defaultResourceTypes>
<types>
<type name="Files">
<url>%BASE_URL%files/</url>
  相关解决方案