首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

fck配备

2012-08-26 
fck配置1.把\fckeditor-java-2.6\java-demo\src\main\webapp\fckeditor拷到工程的webapp目录下2.引入下面

fck配置
1.把\fckeditor-java-2.6\java-demo\src\main\webapp\fckeditor拷到工程的webapp目录下

2.引入下面的dependency到pom.xml
<dependency>
<groupId>net.fckeditor</groupId>
<artifactId>java-core</artifactId>
<version>2.6</version>
</dependency>

3.在web.xml里加上servlet配置

<servlet>
<servlet-name>ConnectorServlet</servlet-name>
<servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class>
<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>
<servlet-name>ConnectorServlet</servlet-name>
<!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
<url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern>
</servlet-mapping>


4。在jsp中引入fck标签
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>

5.添加fck编辑框
<FCK:editor instanceName="entity.installGuide" height='400px'>
<jsp:attribute name="value">${entity.installGuide }
</jsp:attribute>
</FCK:editor>


6:很重要的,修改文件上传时的路径。和访问的路径
在工程根目录下添加,fckeditor.properties


#URI访问路径
#默认工程当前的URI为资源访问路径   默认选项
#connector.impl = net.fckeditor.connector.impl.ContextConnector
#默认工程当前的物理目录为文件保存路径  默认选项
#connector.userPathBuilderImpl = net.fckeditor.requestcycle.impl.ContextPathBuilder

#自已配置URI为资源访问路径
connector.impl=net.fckeditor.connector.impl.LocalConnector
#自已配置文件保存路径
connector.userActionImpl=net.fckeditor.requestcycle.impl.EnabledUserAction
#文件上传路径
connector.userPathBuilderImpl=net.fckeditor.requestcycle.impl.ServerRootPathBuilder

#connector.userFilesPath=http://localhost/cm/fck
#connector.userFilesAbsolutePath=D:/ishellpics/cm/fck

#具体访问URI
connector.userFilesPath=http://www.shellapp.cn/cm/
#具体保存路径
connector.userFilesAbsolutePath=/usr/local/nginx/virtualHosts/shellapp/cm/

热点排行