<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %>
String fckeditorbasePath=request.getContextPath()+"/FCKeditor/";
String browserURL =fckeditorbasePath+"editor/filemanager/browser/default/browser.html";
String uploadURL =fckeditorbasePath+"editor/filemanager/upload/simpleuploader";
String imageBrowserURL =browserURL+"?Type=Image&Connector=connectors/jsp/connector";
String linkBrowserURL =browserURL+"?Connector=connectors/jsp/connector";
String flashBrowserURL =browserURL+"?Type=Flash&Connector=connectors/jsp/connector";
String imageUploadURL =uploadURL+"?Type=Image";
String linkUploadURL =uploadURL+"?Type=File";
String flashUploadURL =uploadURL+"?Type=Flash";
<FCK:editor id="content" width="100%" height="300"
basePath="<%= fckeditorbasePath %>"
imageBrowserURL="<%= imageBrowserURL %>"
linkBrowserURL="<%= linkBrowserURL %>"
flashBrowserURL="<%= flashBrowserURL %>"
imageUploadURL="<%= imageUploadURL %>"
linkUploadURL="<%= linkUploadURL %>"
flashUploadURL="<%= flashUploadURL %>"> <%=content==null?"":content %> </FCK:editor>
web.xml
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<!--
/UserFiles/为项目中用于存放上传文件的文件夹名,
此处默认为/UserFiles/,可以修改,前面不需要写"/项目名"
-->
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<!-- 是否允许调试模式 -->
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SimpleUploader</servlet-name>
<servlet-class>com.fredck.FCKeditor.uploader.SimpleUploaderServlet</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<!--
/UserFiles/为项目中用于存放上传文件的文件夹名,
此处默认为/UserFiles/,可以修改,前面不需要写"/项目名"
-->
<param-value>/UserFiles</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>enabled</param-name>
<!-- 此处默认为false,表示是否开启上传,需要修改 -->
<param-value>true</param-value>
</init-param>
<init-param>
<!-- 允许上文件列表 -->
<param-name>AllowedExtensionsFile</param-name>
<param-value></param-value>
</init-param>
<init-param>
<!-- 不允许上文件列表 -->
<param-name>DeniedExtensionsFile</param-name>
<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>
<param-value>jpg|gif|jpeg|png|bmp</param-value>
</init-param>
<init-param>
<!-- 不允许上传的图片格式列表 -->
<param-name>DeniedExtensionsImage</param-name>
<param-value></param-value>
</init-param>
<init-param>
<!-- 允许上传的Flash格式列表 -->
<param-name>AllowedExtensionsFlash</param-name>
<param-value>swf|fla</param-value>
</init-param>
<init-param>
<!-- 不允许上传的Flash格式列表 -->
<param-name>DeniedExtensionsFlash</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!--以下servlet-mapping 添加/FCKeditor与压缩包中整体复制到项目的文件夹路径相对应-->
<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>
------ Solution ------------------------------------- -------
------ For reference only ---------------------------------- -----
mistake but now no 404 no response after submitting the upload did not upload successfully how ah
------ For reference only - -------------------------------------
themselves in. bulk of the personal
------ For reference only -------------------------------------- -
------ For reference only ---------------------------------- -----
how to solve.
------ For reference only ---------- -----------------------------
solve ah ! ! ! !
没有评论:
发表评论