fckeditor之文件的上传
fckeditor提供了文件上传的功能,可是在使用过程中容易出现一些乱码问题,现将一些解决方法供大家参考
首先配置文件上传的环境
首先在web.xml文件中添加一个Servlet,如下
<servlet><servlet-name>ConnectorServlet</servlet-name><servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class><load-on-startup>1</load-on-startup></servlet><servlet-mapping><servlet-name>ConnectorServlet</servlet-name><!-- Do not wrap this line otherwise Glassfish will fail to load this file --><url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern></servlet-mapping>
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />