Configure the JSP website development environment and use the fckeditor Editor

Source: Internet
Author: User
Tags zip folder

FCKeditor is an open-source project on sourceforge.net. It mainly implements the online web editor function and enables web programs to have powerful editing functions such as MS Word. Official Website for http://www.fckeditor.net, server support ASP. Net, ASP, ClodFusion, PHP, Java and other languages, and support IE 5 +, Mozilla, Netscape and other mainstream browsers.

Download fckeditor from the official website. Note that there are two packages: The main file and the jsp integration package.

1. Decompress fckeditor_2.2.zip (main file of FCKeditor) and copy the FCKeditor directory to the root directory of the website,

2. Decompress fckeditor-2.3.zip, (jsp, FCKeditor Integration package), role: This is the JSP Integration Pack for using FCKeditor inside a java server page without the complexity of using a Java scriptlets or the javascript api.

3. Copy the servlet-mapping definition in the FCKeditor-2.3/web/WEB-INF/web. xml to the web. xml file of your project.

Modify the following content:

Connector

/Editor/filemanager/browser/default/connectors/jsp/connector

SimpleUploader

/Editor/filemanager/upload/simpleuploader

Modification result:

Connector

/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector

SimpleUploader

/FCKeditor/editor/filemanager/upload/simpleuploader

4. copy the files under the FCKeditor-2.3/web/WEB-INF/lib directory to the lib folder of your project

5. Add:

// Add at the beginning of the file

// Add the desired location

ImageBrowserURL = "/FCKeditor/editor/filemanager/browser/default/browser.html?

Type = Image & Connector = connectors/jsp/connector"

LinkBrowserURL = "/FCKeditor/editor/filemanager/browser/default/browser.html?

Connector = connectors/jsp/connector"

FlashBrowserURL = "/FCKeditor/editor/filemanager/browser/default/browser.html?

Type = Flash & Connector = connectors/jsp/connector"

ImageUploadURL = "/FCKeditor/editor/filemanager/upload/simpleuploader? Type = Image"

LinkUploadURL = "/FCKeditor/editor/filemanager/upload/simpleuploader? Type = File"

FlashUploadURL = "/FCKeditor/editor/filemanager/upload/simpleuploader? Type = Flash ">

This is default content :)

Start server testing... After success, the FCKeditor will be reduced.

1. Delete all folders starting with "_" in the FCKeditor directory and subdirectory

2. Only fckconfig. js, FCKeditor. js, fckstyles. xml, and fcktemplates. xml are retained in the root directory of fckeditor.

3. Clear the files and folders in the editor/filemanager/upload directory.

4. You can also delete the skin files under the editor/skins directory, leaving only the default skin (if you do not need to change the skin)

5. you can also delete the files in the editor/lang directory and retain only en. js, fck1_agemanager. js, zh-cn.js, zh. js files (English, simplified Chinese, traditional Chinese should be enough :))

Complete.

Other problems:

When used in struts + spring + hibernate, the image upload function may report:

The output format must have a' {http://xml.apache.org/xalan=content-handler' property!

If the error occurs, try removing xalan *. jar under the WEB-INF/lib directory.

Security Questions:

If FCKEditor can be used by common users on the foreground, pay attention to related security issues. Do not use the default ToolBar when using the foreground. Remove the buttons for adding images, flash, and image domains, in fckconfig. about 78 lines in js configure the values in those arrays, just like a function on the interface, you can force each group of values to try out what they represent.

The fckeditorinstallation is complete. For detailed configuration, see the examples in the web/_ samples directory in the fckeditor-2.3.zip folder (jsp, FCKeditor integration package.

Related Article

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.