我是这样实现FCKeditor_2.4.2
经过数天调试,终于在seam中成功实现 FCKeditor_2.4.2。
FCKeditor的上传目录为相对于web根目录的一个临时目录,每次jboss重启,临时目录都要改名,导致原先上传文件全部丢失,通过修改ConnectorServlet.java,实现了在web.xml中指定上传文件绝对路径,解决了上传文件保存问题。
我的环境:winxp,jboss4.0.5,seam1.1.6,jboss-ide2.0
1、“FCKeditor”目录放置于view目录下。
2、修改“/FCKeditor/fckeditor.js”(以下2-8条摘自http://lingoosoft.blog.ccidnet.com/blog/ccid/do_showone/tid_139643.html)
将其中:
this.BasePath = '/fckeditor/' ;
改为:
this.BasePath = '/FCKeditor/' ;
3、修改“/FCKeditor/fckconfig.js”
将其中:
var _FileBrowserLanguage = 'asp' ;
var _QuickUploadLanguage = 'asp' ;
改为:
var _FileBrowserLanguage = 'jsp' ;
var _QuickUploadLanguage = 'jsp' ;
4、在SimpleUploaderServlet.java的约第113行附近,加入下面代码,避免构建null路径
if (typeStr==null || typeStr.trim().equals("")) typeStr = "File";
(这个是仿照fckeditor在upload.php,upload.asp等源码来修改的)
5、修改fck-faces-1.7.26.jar源码,在Servlet.java中加入如下代码:
(此代码解决了上传文件无响应的问题)
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}
6、在FCKFaceEditorTag.java中加入处理编辑器宽和高的代码:
修改下面方法
protected void setProperties(UIComponent component) {
super.setProperties(component);
Tags.setString(component, "toolbarSet", toolbarSet);
}
为:
protected void setProperties(UIComponent component) {
super.setProperties(component);
Tags.setString(component, "toolbarSet", toolbarSet);
Tags.setString(component, "height", height);
Tags.setString(component, "width", width);
}
7、修改 org.fckfaces.component.html.FCKFaceEditor的saveState(FacesContext context)和restoreState(FacesContext context, Object state)方法,来保存和恢复宽和高的属性。
public Object saveState(FacesContext context) {
Object values[] = new Object[4];
values[0] = super.saveState(context);
values[1] = height;
values[2] = width;
values[3] = toolbarSet;
return ((Object) (values));
}
public void restoreState(FacesContext context, Object state) {
Object values[] = (Object[])(Object[])state;
super.restoreState(context, values[0]);
System.out.println(values.length);
height = (String)values[1];
width = (String)values[2];
toolbarSet = (String)values[3];
}
8、web.xml中的配置
<!-- FCK Editor -->
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
com.fredck.FCKeditor.connector.ConnectorServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/upload/</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>
<param-value>/upload/</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>
<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>
html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis
</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>
<param-name>AllowedExtensionsFlash</param-name>
<param-value>swf|fla</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFlash</param-name>
<param-value></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.jsp
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/upload/jsp/upload.jsp
</url-pattern>
</servlet-mapping>
<!-- FCK faces -->
<!-- 如果FCKeditor放到WEB“/”目录,则一般不会使用此项
<context-param>
<param-name>org.fckfaces.CUSTOM_CONFIGURATIONS_PATH</param-name>
<param-value>/inc/fckconfig.js</param-value>
</context-param>
-->
<servlet>
<servlet-name>FCK Faces Servlet</servlet-name>
<servlet-class>org.fckfaces.util.Servlet</servlet-class>
<init-param>
<description>
Allows to specify the path of the FCKeditor resources
</description>
<param-name>customResourcePath</param-name>
<param-value>/</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FCK Faces Servlet</servlet-name>
<url-pattern>/fckfaces/*</url-pattern>
<!-- /fckfaces 与 fck-faces 源码中 Util.java 类中的配置相对应 -->
</servlet-mapping>
9、修改ConnectorServlet.java
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: ConnectorServlet.java
* Java Connector for Resource Manager class.
*
* Version: 2.3
* Modified: 2005-08-11 16:29:00
*
* File Authors:
* Simone Chiaretta (simo@users.sourceforge.net)
*/
package com.fredck.FCKeditor.connector;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import org.apache.commons.fileupload.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
/**
* Servlet to upload and browse files.<br>
*
* This servlet accepts 4 commands used to retrieve and create files and folders from a server directory.
* The allowed commands are:
* <ul>
* <li>GetFolders: Retrive the list of directory under the current folder
* <li>GetFoldersAndFiles: Retrive the list of files and directory under the current folder
* <li>CreateFolder: Create a new directory under the current folder
* <li>FileUpload: Send a new file to the server (must be sent with a POST)
* </ul>
*
* @author Simone Chiaretta (simo@users.sourceforge.net)
*/
public class ConnectorServlet extends HttpServlet {
private static String baseDir;
private static boolean debug=false;
/**
* Initialize the servlet.<br>
* Retrieve from the servlet configuration the "baseDir" which is the root of the file repository:<br>
* If not specified the value of "/UserFiles/" will be used.
*
*/
public void init() throws ServletException {
baseDir=getInitParameter("baseDir");
debug=(new Boolean(getInitParameter("debug"))).booleanValue();
/*
if(baseDir==null)
baseDir="/UserFiles/";
String realBaseDir=getServletContext().getRealPath(baseDir);
File baseFile=new File(realBaseDir);
*/
System.out.println("cbq baseDir " + baseDir);
File baseFile=new File(baseDir);
if(!baseFile.exists()){
baseFile.mkdir();
}
}
/**
* Manage the Get requests (GetFolders, GetFoldersAndFiles, CreateFolder).<br>
*
* The servlet accepts commands sent in the following format:<br>
* connector?Command=CommandName&Type=ResourceType&CurrentFolder=FolderPath<br><br>
* It execute the command and then return the results to the client in XML format.
*
*/
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (debug) System.out.println("--- BEGIN DOGET ---");
response.setContentType("text/xml; charset=UTF-8");
response.setHeader("Cache-Control","no-cache");
PrintWriter out = response.getWriter();
String commandStr=request.getParameter("Command");
String typeStr=request.getParameter("Type");
String currentFolderStr=request.getParameter("CurrentFolder");
String currentPath=baseDir+typeStr+currentFolderStr;
//String currentDirPath=getServletContext().getRealPath(currentPath);
//cbq
//System.out.println("cbq currentDirPath " + currentDirPath);
System.out.println("cbq currentPath " + currentPath);
File currentDir=new File(currentPath);
if(!currentDir.exists()){
currentDir.mkdir();
}
Document document=null;
try {
DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
document=builder.newDocument();
} catch (ParserConfigurationException pce) {
pce.printStackTrace();
}
Node root=CreateCommonXml(document,commandStr,typeStr,currentFolderStr,currentPath); //request.getContextPath()+currentPath);
if (debug) System.out.println("Command = " + commandStr);
if(commandStr.equals("GetFolders")) {
getFolders(currentDir,root,document);
}
else if (commandStr.equals("GetFoldersAndFiles")) {
getFolders(currentDir,root,document);
getFiles(currentDir,root,document);
}
else if (commandStr.equals("CreateFolder")) {
String newFolderStr=request.getParameter("NewFolderName");
File newFolder=new File(currentDir,newFolderStr);
String retValue="110";
if(newFolder.exists()){
retValue="101";
}
else {
try {
boolean dirCreated = newFolder.mkdir();
if(dirCreated)
retValue="0";
else
retValue="102";
}catch(SecurityException sex) {
retValue="103";
}
}
setCreateFolderResponse(retValue,root,document);
}
document.getDocumentElement().normalize();
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(document);
StreamResult result = new StreamResult(out);
transformer.transform(source, result);
if (debug) {
StreamResult dbgResult = new StreamResult(System.out);
transformer.transform(source, dbgResult);
System.out.println("");
System.out.println("--- END DOGET ---");
}
} catch (Exception ex) {
ex.printStackTrace();
}
out.flush();
out.close();
}
/**
* Manage the Post requests (FileUpload).<br>
*
* The servlet accepts commands sent in the following format:<br>
* connector?Command=FileUpload&Type=ResourceType&CurrentFolder=FolderPath<br><br>
* It store the file (renaming it in case a file with the same name exists) and then return an HTML file
* with a javascript command in it.
*
*/
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (debug) System.out.println("--- BEGIN DOPOST ---");
response.setContentType("text/html; charset=UTF-8");
response.setHeader("Cache-Control","no-cache");
PrintWriter out = response.getWriter();
String commandStr=request.getParameter("Command");
String typeStr=request.getParameter("Type");
String currentFolderStr=request.getParameter("CurrentFolder");
String currentPath=baseDir+typeStr+currentFolderStr;
//String currentDirPath=getServletContext().getRealPath(currentPath);
//if (debug) System.out.println("currentDirPath: " + currentDirPath);
if (debug) System.out.println("currentPath: " + currentPath);
String retVal="0";
String newName="";
if(!commandStr.equals("FileUpload"))
retVal="203";
else {
DiskFileUpload upload = new DiskFileUpload();
try {
List items = upload.parseRequest(request);
Map fields=new HashMap();
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField())
fields.put(item.getFieldName(),item.getString());
else
fields.put(item.getFieldName(),item);
}
FileItem uplFile=(FileItem)fields.get("NewFile");
String fileNameLong=uplFile.getName();
fileNameLong=fileNameLong.replace('/','/');
String[] pathParts=fileNameLong.split("/");
String fileName=pathParts[pathParts.length-1];
String nameWithoutExt=getNameWithoutExtension(fileName);
String ext=getExtension(fileName);
File pathToSave=new File(currentPath,fileName);
int counter=1;
while(pathToSave.exists()){
newName=nameWithoutExt+"("+counter+")"+"."+ext;
retVal="201";
pathToSave=new File(currentPath,newName);
counter++;
}
uplFile.write(pathToSave);
}catch (Exception ex) {
retVal="203";
}
}
out.println("<script type="text/javascript">");
out.println("window.parent.frames['frmUpload'].OnUploadCompleted("+retVal+",'"+newName+"');");
out.println("</script>");
out.flush();
out.close();
if (debug) System.out.println("--- END DOPOST ---");
}
private void setCreateFolderResponse(String retValue,Node root,Document doc) {
Element myEl=doc.createElement("Error");
myEl.setAttribute("number",retValue);
root.appendChild(myEl);
}
private void getFolders(File dir,Node root,Document doc) {
Element folders=doc.createElement("Folders");
root.appendChild(folders);
File[] fileList=dir.listFiles();
for(int i=0;i<fileList.length;++i) {
if(fileList[i].isDirectory()){
Element myEl=doc.createElement("Folder");
myEl.setAttribute("name",fileList[i].getName());
folders.appendChild(myEl);
}
}
}
private void getFiles(File dir,Node root,Document doc) {
Element files=doc.createElement("Files");
root.appendChild(files);
File[] fileList=dir.listFiles();
for(int i=0;i<fileList.length;++i) {
if(fileList[i].isFile()){
Element myEl=doc.createElement("File");
myEl.setAttribute("name",fileList[i].getName());
myEl.setAttribute("size",""+fileList[i].length()/1024);
files.appendChild(myEl);
}
}
}
private Node CreateCommonXml(Document doc,String commandStr, String typeStr, String currentPath, String currentUrl ) {
Element root=doc.createElement("Connector");
doc.appendChild(root);
root.setAttribute("command",commandStr);
root.setAttribute("resourceType",typeStr);
Element myEl=doc.createElement("CurrentFolder");
myEl.setAttribute("path",currentPath);
myEl.setAttribute("url",currentUrl);
root.appendChild(myEl);
return root;
}
/*
* This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF bug #991489
*/
private static String getNameWithoutExtension(String fileName) {
return fileName.substring(0, fileName.lastIndexOf("."));
}
/*
* This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF bug #991489
*/
private String getExtension(String fileName) {
return fileName.substring(fileName.lastIndexOf(".")+1);
}
}
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: ConnectorServlet.java
* Java Connector for Resource Manager class.
*
* Version: 2.3
* Modified: 2005-08-11 16:29:00
*
* File Authors:
* Simone Chiaretta (simo@users.sourceforge.net)
*/
package com.fredck.FCKeditor.connector;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import org.apache.commons.fileupload.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
/**
* Servlet to upload and browse files.<br>
*
* This servlet accepts 4 commands used to retrieve and create files and folders from a server directory.
* The allowed commands are:
* <ul>
* <li>GetFolders: Retrive the list of directory under the current folder
* <li>GetFoldersAndFiles: Retrive the list of files and directory under the current folder
* <li>CreateFolder: Create a new directory under the current folder
* <li>FileUpload: Send a new file to the server (must be sent with a POST)
* </ul>
*
* @author Simone Chiaretta (simo@users.sourceforge.net)
*/
public class ConnectorServlet extends HttpServlet {
private static String baseDir;
private static boolean debug=false;
/**
* Initialize the servlet.<br>
* Retrieve from the servlet configuration the "baseDir" which is the root of the file repository:<br>
* If not specified the value of "/UserFiles/" will be used.
*
*/
public void init() throws ServletException {
baseDir=getInitParameter("baseDir");
debug=(new Boolean(getInitParameter("debug"))).booleanValue();
/*
if(baseDir==null)
baseDir="/UserFiles/";
String realBaseDir=getServletContext().getRealPath(baseDir);
File baseFile=new File(realBaseDir);
*/
System.out.println("cbq baseDir " + baseDir);
File baseFile=new File(baseDir);
if(!baseFile.exists()){
baseFile.mkdir();
}
}
/**
* Manage the Get requests (GetFolders, GetFoldersAndFiles, CreateFolder).<br>
*
* The servlet accepts commands sent in the following format:<br>
* connector?Command=CommandName&Type=ResourceType&CurrentFolder=FolderPath<br><br>
* It execute the command and then return the results to the client in XML format.
*
*/
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (debug) System.out.println("--- BEGIN DOGET ---");
response.setContentType("text/xml; charset=UTF-8");
response.setHeader("Cache-Control","no-cache");
PrintWriter out = response.getWriter();
String commandStr=request.getParameter("Command");
String typeStr=request.getParameter("Type");
String currentFolderStr=request.getParameter("CurrentFolder");
String currentPath=baseDir+typeStr+currentFolderStr;
//String currentDirPath=getServletContext().getRealPath(currentPath);
//cbq
//System.out.println("cbq currentDirPath " + currentDirPath);
System.out.println("cbq currentPath " + currentPath);
File currentDir=new File(currentPath);
if(!currentDir.exists()){
currentDir.mkdir();
}
Document document=null;
try {
DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
document=builder.newDocument();
} catch (ParserConfigurationException pce) {
pce.printStackTrace();
}
Node root=CreateCommonXml(document,commandStr,typeStr,currentFolderStr,currentPath); //request.getContextPath()+currentPath);
if (debug) System.out.println("Command = " + commandStr);
if(commandStr.equals("GetFolders")) {
getFolders(currentDir,root,document);
}
else if (commandStr.equals("GetFoldersAndFiles")) {
getFolders(currentDir,root,document);
getFiles(currentDir,root,document);
}
else if (commandStr.equals("CreateFolder")) {
String newFolderStr=request.getParameter("NewFolderName");
File newFolder=new File(currentDir,newFolderStr);
String retValue="110";
if(newFolder.exists()){
retValue="101";
}
else {
try {
boolean dirCreated = newFolder.mkdir();
if(dirCreated)
retValue="0";
else
retValue="102";
}catch(SecurityException sex) {
retValue="103";
}
}
setCreateFolderResponse(retValue,root,document);
}
document.getDocumentElement().normalize();
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(document);
StreamResult result = new StreamResult(out);
transformer.transform(source, result);
if (debug) {
StreamResult dbgResult = new StreamResult(System.out);
transformer.transform(source, dbgResult);
System.out.println("");
System.out.println("--- END DOGET ---");
}
} catch (Exception ex) {
ex.printStackTrace();
}
out.flush();
out.close();
}
/**
* Manage the Post requests (FileUpload).<br>
*
* The servlet accepts commands sent in the following format:<br>
* connector?Command=FileUpload&Type=ResourceType&CurrentFolder=FolderPath<br><br>
* It store the file (renaming it in case a file with the same name exists) and then return an HTML file
* with a javascript command in it.
*
*/
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (debug) System.out.println("--- BEGIN DOPOST ---");
response.setContentType("text/html; charset=UTF-8");
response.setHeader("Cache-Control","no-cache");
PrintWriter out = response.getWriter();
String commandStr=request.getParameter("Command");
String typeStr=request.getParameter("Type");
String currentFolderStr=request.getParameter("CurrentFolder");
String currentPath=baseDir+typeStr+currentFolderStr;
//String currentDirPath=getServletContext().getRealPath(currentPath);
//if (debug) System.out.println("currentDirPath: " + currentDirPath);
if (debug) System.out.println("currentPath: " + currentPath);
String retVal="0";
String newName="";
if(!commandStr.equals("FileUpload"))
retVal="203";
else {
DiskFileUpload upload = new DiskFileUpload();
try {
List items = upload.parseRequest(request);
Map fields=new HashMap();
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField())
fields.put(item.getFieldName(),item.getString());
else
fields.put(item.getFieldName(),item);
}
FileItem uplFile=(FileItem)fields.get("NewFile");
String fileNameLong=uplFile.getName();
fileNameLong=fileNameLong.replace('/','/');
String[] pathParts=fileNameLong.split("/");
String fileName=pathParts[pathParts.length-1];
String nameWithoutExt=getNameWithoutExtension(fileName);
String ext=getExtension(fileName);
File pathToSave=new File(currentPath,fileName);
int counter=1;
while(pathToSave.exists()){
newName=nameWithoutExt+"("+counter+")"+"."+ext;
retVal="201";
pathToSave=new File(currentPath,newName);
counter++;
}
uplFile.write(pathToSave);
}catch (Exception ex) {
retVal="203";
}
}
out.println("<script type="text/javascript">");
out.println("window.parent.frames['frmUpload'].OnUploadCompleted("+retVal+",'"+newName+"');");
out.println("</script>");
out.flush();
out.close();
if (debug) System.out.println("--- END DOPOST ---");
}
private void setCreateFolderResponse(String retValue,Node root,Document doc) {
Element myEl=doc.createElement("Error");
myEl.setAttribute("number",retValue);
root.appendChild(myEl);
}
private void getFolders(File dir,Node root,Document doc) {
Element folders=doc.createElement("Folders");
root.appendChild(folders);
File[] fileList=dir.listFiles();
for(int i=0;i<fileList.length;++i) {
if(fileList[i].isDirectory()){
Element myEl=doc.createElement("Folder");
myEl.setAttribute("name",fileList[i].getName());
folders.appendChild(myEl);
}
}
}
private void getFiles(File dir,Node root,Document doc) {
Element files=doc.createElement("Files");
root.appendChild(files);
File[] fileList=dir.listFiles();
for(int i=0;i<fileList.length;++i) {
if(fileList[i].isFile()){
Element myEl=doc.createElement("File");
myEl.setAttribute("name",fileList[i].getName());
myEl.setAttribute("size",""+fileList[i].length()/1024);
files.appendChild(myEl);
}
}
}
private Node CreateCommonXml(Document doc,String commandStr, String typeStr, String currentPath, String currentUrl ) {
Element root=doc.createElement("Connector");
doc.appendChild(root);
root.setAttribute("command",commandStr);
root.setAttribute("resourceType",typeStr);
Element myEl=doc.createElement("CurrentFolder");
myEl.setAttribute("path",currentPath);
myEl.setAttribute("url",currentUrl);
root.appendChild(myEl);
return root;
}
/*
* This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF bug #991489
*/
private static String getNameWithoutExtension(String fileName) {
return fileName.substring(0, fileName.lastIndexOf("."));
}
/*
* This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF bug #991489
*/
private String getExtension(String fileName) {
return fileName.substring(fileName.lastIndexOf(".")+1);
}
}
使用File baseFile=new File(baseDir),定义绝对路径。
这样,在web.xml中,即可直接指定绝对路径
<param-name>baseDir</param-name>
<param-value>C://fckUpload/</param-value>
10、根据web.xml中的参数
<servlet-name>Connector</servlet-name>
<url-pattern>/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector.jsp</url-pattern>
需要手工建立对应的文件夹,文件connector.jsp由test.html改名即可。
用同样方法修改
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/FCKeditor/editor/filemanager/upload/upload.jsp</url-pattern>
对应的文件夹和文件。