CKEditor + CKFinder + jsp

Source: Internet
Author: User

CKEditor is a new generation of FCKeditor, which is a redevelopment version. CKEditor is one of the world's best online web text editors. It is widely used in various websites for its amazing performance and scalability.

This article mainly introduces ckeditor_3.6.4 + ckfinder_java_2.3

CKEditor: http://ckeditor.com/download Online Demo address: http://ckeditor.com/demo

Ckeditor-java-core-3.5.3.zip: http://ckeditor.com/download

CKFinder: http://cksource.com/ckfinder/trial

1. Decompress ckeditor_3.6.4.zip, and open the ckeditor folder. You only need to retain: keystore.

Other files can be deleted. Then the entire ckeditor is placed under the web Project, in the same level of directory as the WEB-INF.

2. Decompress ckeditor-java-core-3.5.3.zip and copy the ckeditor-java-core-3.5.3.jar package to the lib of the web Project.

3. Decompress ckfinder_java_2.3.zip and then decompress CKFinderJava. after the war is decompressed, copy all the jar packages under the lib in the WEB-INF to the lib of the web Project, copy the ckfinder folder under CKFinder \ _ sources \ ckfinder for Java \ WebApp \ src \ main \ webapp to the web Project, keep the same level as ckeditor, and keep the config under the WEB-INF. copy the xml file to the WEB-INF of the web Project and make slight adjustments to your project, as shown below:

<Config>
<Enabled> true </enabled> <! -- Note: The default value is false and must be changed to true. -->
<BaseDir> </baseDir> <! -- This field is empty. We do not recommend entering any value. -->
<BaseURL> http: // 127.0.0.1: 8088/sitenav/uploadFiles/</baseURL> <! --- Note: You must change it to your own project. Otherwise, you cannot find the specific network path for the uploaded image. -->
<LicenseKey> </licenseKey>
<LicenseName> </licenseName>
1600 </imgWidth>
1200 </imgHeight>
80 </imgQuality>
<UriEncoding> UTF-8 </uriEncoding>
............
</Config>

4. Add the upload configuration in web. xml as follows:

<! -- Ckfinder File Upload configuration start -->
<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> 2 </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>
<! -- Ckfinder File Upload configuration end -->

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.