`
147175882
  • 浏览: 132885 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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/
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics