下载2。6编辑器,和for java 2。3 包解压在网站根目录ROOT下,我使用的是TOMCAT默认根目录,再将for java包里的lib里的包复制到WEB-INF/lib下,并将 fckeditor.tld也复制到WEB-INF下修改/WebRoot/WEB-INF/web.xml文件,只定义了两个Servlet映射,并且对上传文件的目录和允许哪些文件上传、拒绝哪些文件上传做了设置,请注意,这两个servlet的url-pattern我都在原来代码的前面加上了/fckeditor,这是表示FCKeditor的根目录。另外SimpleUploader中的enabled属性要改成true,允许上传,增加内容如下: Connector com.fredck.FCKeditor.connector.ConnectorServlet baseDir /UserFiles/ debug true 1 Connector /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector
Tag library
Declare the tag extension in each JSP page that uses the FCKeditor.Java taglib. The uri directive must match the uri defined in the tag reference. The prefix identifies the tags in the tag library within a JSP page.
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>The declaration, if you are using a JSP XML syntax, looks like:
<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:FCK="http://java.fckeditor.net">Now you are set to use the taglib. A brief declaration would be:
<FCK:editor instanceName="EditorDefault">
<jsp:attribute name="value">This is some <strong>sample text</strong>.
You are using <a href="http://www.fckeditor.net">FCKeditor</a>.
</jsp:attribute>
</FCK:editor>For a more complete overview, take a look at the tag reference.