According to an online article on the Guide to test FCKeditor, found Fckeditor_2.2.rar bag in the/fckeditor_2.2/fckeditor/editor/filemanager no JSP folder, feel strange. Think that the developer forgot to pack in the inside (haha, ridiculous), and then download the old version of the view, or not, depressed ...
So look at the source code in the Fckeditor-java-.rar, the source code changed, itself is configurable, let me give up, hey. Modified is the Com.fredck.FCKeditor.uploader.SimpleUploaderServlet init method, all of which are hard-coded:
public void Init () throws Servletexception {
Debug=true;
if (Debug) System.out.println ("/r/n----simpleuploaderservlet initialization started----");
Basedir= "/userfiles/";
Enabled=true;
String Realbasedir=getservletcontext (). Getrealpath (BaseDir);
File Basefile=new file (Realbasedir);
if (!basefile.exists ()) {
Basefile.mkdir ();
}
Allowedextensions = new Hashtable (3);
Deniedextensions = new Hashtable (3);
Allowedextensions.put ("File", Stringtoarraylist (""));
Deniedextensions.put ("File", Stringtoarraylist ("php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll| reg|cgi "));
Allowedextensions.put ("Image", Stringtoarraylist ("jpg|gif|jpeg|png|bmp"));
Deniedextensions.put ("Image", Stringtoarraylist (""));
Allowedextensions.put ("Flash", Stringtoarraylist ("Swf|fla"));
Deniedextensions.put ("Flash", Stringtoarraylist (""));
if (Debug) System.out.println ("----simpleuploaderservlet initialization completed----/r/n");
}
Then modify the/fckeditor/fckconfig.js
Fckconfig.linkbrowserurl = Fckconfig.basepath + ' filemanager/browser/default/browser.html? Connector=/servlet/com.fredck.fckeditor.connector.connectorservlet ';
Fckconfig.imagebrowserurl = Fckconfig.basepath + ' filemanager/browser/default/browser.html? Type=image&connector=/servlet/com.fredck.fckeditor.connector.connectorservlet ';
Fckconfig.flashbrowserurl = Fckconfig.basepath + ' filemanager/browser/default/browser.html? Type=flash&connector=/servlet/com.fredck.fckeditor.connector.connectorservlet ';
Fckconfig.linkuploadurl = '/servlet/com.fredck.fckeditor.uploader.simpleuploaderservlet ';
Fckconfig.imageuploadurl = '/servlet/com.fredck.fckeditor.uploader.simpleuploaderservlet? Type=image ';
Fckconfig.flashuploadurl = '/servlet/com.fredck.fckeditor.uploader.simpleuploaderservlet? Type=flash ';
Then you can test the example below Fckeditor-java.rar.
Originally can support asp,php ... Now all make support Java, hehe ...