Using FCKeditor in a JSP
1.1 Runtime Commons-fileupload-1.1.jar Fckeditor-2.3.jar 1.2 Editor Version FCKeditor 2.0 FCKeditor is an online editor that contains almost all of the online editors that are now online, The realization of the function is quite perfect, at the same time can customize the function button, support the configuration installment in the multiple language environment
1.3 Using the steps 1.3.1 the WEB application directory structure
1.3.2 Configuration Description <?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.3//en" "Http://java.sun.com/dtd/web-app_2_3. DTD ">
<web-app>
<display-name>demo</display-name>
<servlet>
<servlet-name>connector</servlet-name><!-is used to list uploaded file lists-->
<servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/userfiles/</param-value><!-Upload file storage path-->
</init-param>
<init-param>
<param-name>debug</param-name><!-Display Debug Information-->
<param-value>true</param-value>
</init-param>
Load--> when <load-on-startup>1</load-on-startup><!-starts
</servlet>
<servlet>
<servlet-name>simpleuploader</servlet-name><!-for uploading Files-->
<servlet-class>com.fredck.FCKeditor.uploader.SimpleUploaderServlet</servlet-class>
<init-param>
<param-name>basedir</param-name><!-Upload file storage path-->
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name><!-Display Debug Information-->
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>enabled</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>deniedextensionsfile</param-name><!-reject upload file type list-->
<param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
</init-param>
<init-param>
<param-name>allowedextensionsimage</param-name><!-allow upload of picture type list-->
<param-value>jpg|gif|jpeg|png|bmp</param-value>
</init-param>
<init-param>
<param-name>allowedextensionsflash</param-name><!-allow upload of flash type list-->
<param-value>swf|fla</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern> <!-a servlet map for listing uploaded files-->
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/FCKeditor/editor/filemanager/upload/simpleuploader</url-pattern>
</servlet-mapping><!-a servlet map for uploading files-->
<taglib>
<taglib-uri>fck</taglib-uri><!-Tag Library Mapping-->
<taglib-location>/WEB-INF/classes/FCKeditor.tld</taglib-location>
</taglib>
</web-app>
1.3.3 JSP Reference method
1.3.4 Run demo
1.3.5 JSP original <% @page contenttype= "text/html; CHARSET=GBK "%>
<% @taglib uri= "FCK" prefix= "FCK"%>
<title>index</title>
<body bgcolor= "#ffffff" >
<form action= "postdata.jsp" Name= "Form1" method= "POST" >
Document title: <input type= "text" name= "test" value= "testing Data"/>
<fck:editor id= "Editordefault" basepath= "/fckeditor/"
Fontnames= "Song body; Arial; Courier New; Times New Roman; Verdana "
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 ">
The following content is <strong> test data </strong>. Welcome to use <a href= "http://www.fredck.com/fckeditor/" >FCKEDITOR</A>.
</FCK:editor>
<input type= "Submit" value= "submitted"/>
</form>
</body>