Configure the use of FCKeditor in JSP

Source: Internet
Author: User
Tags zip root directory

FCKeditor is an open source project above SourceForge.net, which implements the functions of the Online Web page editor, allowing web programs to have powerful editing capabilities such as MS Word. The official website is http://www.fckeditor.net, support asp.net, ASP, clodfusion, PHP, Java and other languages on the server side, and support the mainstream browser such as IE 5+, Mozilla, Netscape.

First in the official website download FCKeditor, note that there are two packages, one is the main file, one is the JSP integration package.

1, decompression Fckeditor_2.2.zip, (fckeditor main file), the FCKeditor directory copied to the site root directory,

2, Decompression Fckeditor-2.3.zip, (Jsp,fckeditor integration package), function: 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 two servlet,servlet-mapping definitions from fckeditor-2.3/web/web-inf/web.xml to web.xml files from the project

Modify:

<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/editor/filemanager/upload/simpleuploader</url-pattern>
</servlet-mapping>

For:

<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/FCKeditor/editor/filemanager/upload/simpleuploader</url-pattern>
</servlet-mapping>

4. Copy the files in the Fckeditor-2.3/web/web-inf/lib directory to the Lib folder of your own project

5, in the need to use FCKeditor JSP interface to add:

// 文件开头处加入
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %>
//要使用的地方加入
<FCK:editor id="content" basePath="/FCKeditor/"
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 :)
</FCK:editor>

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.