Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/ConfigurationHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/ConfigurationHandler.java	(revision 1311)
+++ 	(revision )
@@ -1,157 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-package com.fredck.fckeditor;
-
-/**
- * Static handler object, which provides getters and setters for basic values like fckeditor dir, base dir (user dir)
- * and defaults for height, width and toolbar of the editor. All values are preset by the defaults defined in
- * default.properties. This object is used everywhere these values are needed. <br />
- * If the {@link IBaseDirProvider} is set, {@link #getBaseDir()} is calling {@link IBaseDirProvider#getDir()} to get the
- * user dir.
- * 
- * @version $Id:ConfigurationHandler.java 1099 2007-11-06 15:01:50Z th-schwarz $´
- */
-public class ConfigurationHandler {
-    private static String baseDir;
-
-    private static IBaseDirProvider baseDirProvider = null;
-
-    private static String fckEditorDir;
-
-    private static String fckEditorHeight;
-
-    private static String fckEditorWidth;
-
-    private static String fckEditorToolbarSet;
-
-    static {
-	// load defaults
-	baseDir = DefaultPropertiesHolder.get("fckeditor.basedir");
-	fckEditorDir = DefaultPropertiesHolder.get("fckeditor.dir");
-	fckEditorWidth = DefaultPropertiesHolder.get("fckeditor.width");
-	fckEditorHeight = DefaultPropertiesHolder.get("fckeditor.height");
-	fckEditorToolbarSet = DefaultPropertiesHolder.get("fckeditor.toolbarset");
-    }
-
-    /**
-     * Getter for the base dir (using for user files).
-     * 
-     * @return If the {@link IBaseDirProvider} is set, then it's dir getter is called, or base dir.
-     */
-    public static String getBaseDir() {
-	return (baseDirProvider != null) ? baseDirProvider.getDir() : baseDir;
-    }
-
-    /**
-     * Setter for the base dir (using for user files).
-     * 
-     * @param baseDir
-     *                relative to the context root (no leading or ending /).
-     */
-    public static void setBaseDir(final String baseDir) {
-	ConfigurationHandler.baseDir = baseDir;
-    }
-
-    /**
-     * Getter for the {@link IBaseDirProvider}.
-     * 
-     * @param baseDirProvider
-     */
-    public static void setBaseDirProvider(final IBaseDirProvider baseDirProvider) {
-	ConfigurationHandler.baseDirProvider = baseDirProvider;
-    }
-
-    /**
-     * Getter for the dir of the fckeditor.
-     * 
-     * @return Dir of the fckeditor relative to the context root.
-     */
-    public static String getFckEditorDir() {
-	return fckEditorDir;
-    }
-
-    /**
-     * Setter for the dir of the fckeditor.
-     * 
-     * @param fckEditorDir
-     *                relative to the context root (no leading or ending /).
-     */
-    public static void setFckEditorDir(final String fckEditorDir) {
-	ConfigurationHandler.fckEditorDir = fckEditorDir;
-    }
-
-    /**
-     * Getter for the default height of the fckeditor.
-     * 
-     * @return Default height of the fckeditor.
-     */
-    public static String getFckEditorHeight() {
-	return fckEditorHeight;
-    }
-
-    /**
-     * Setter for the default height of the fckeditor.
-     * 
-     * @param fckEditorHeight
-     *                the default height of the fckeditor.
-     */
-    public static void setFckEditorHeight(final String fckEditorHeight) {
-	ConfigurationHandler.fckEditorHeight = fckEditorHeight;
-    }
-
-    /**
-     * Getter for the default width of the fckeditor.
-     * 
-     * @return Default width of the fckeditor.
-     */
-    public static String getFckEditorWidth() {
-	return fckEditorWidth;
-    }
-
-    /**
-     * Setter for the default width of the fckeditor.
-     * 
-     * @param fckEditorWidth
-     *                the default width of the fckeditor.
-     */
-    public static void setFckEditorWidth(final String fckEditorWidth) {
-	ConfigurationHandler.fckEditorWidth = fckEditorWidth;
-    }
-
-    /**
-     * Getter of the name of the default toolbarset of the fckeditor.
-     * 
-     * @return Name of the default toolbar set.
-     */
-    public static String getFckEditorToolbarSet() {
-	return fckEditorToolbarSet;
-    }
-
-    /**
-     * Getter of the name of the default toolbarset of the fckeditor.
-     * 
-     * @param fckEditorToolbarSet
-     *                the name of the toolbarset.
-     */
-    public static void setFckEditorToolbarSet(final String fckEditorToolbarSet) {
-	ConfigurationHandler.fckEditorToolbarSet = fckEditorToolbarSet;
-    }
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/Constants.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/Constants.java	(revision 1311)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-package com.fredck.fckeditor;
-
-/**
- * Some global constants.
- *
- * @version $Id$
- */
-public class Constants {
-	
-    public static final String FILE_TYPE_FILE = "File";
-    public static final String FILE_TYPE_IMAGE = "Image";
-    public static final String FILE_TYPE_FLASH = "Flash";
-    public static final String FILE_TYPE_MEDIA = "Media";
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/DefaultPropertiesHolder.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/DefaultPropertiesHolder.java	(revision 1311)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-
-package com.fredck.fckeditor;
-
-import java.io.BufferedInputStream;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Holds the global properties. Defaults are read from a property file. With a
- * setter methode you can overwrite defaults or set new one.
- * 
- * @version $Id$
- */
-public class DefaultPropertiesHolder {
-    private static Map properties = new Hashtable();
-    
-    static {
-	try {
-	    Properties props = new Properties();
-		props.load(new BufferedInputStream(DefaultPropertiesHolder.class
-		        .getResourceAsStream("default.properties")));
-	    properties = props;
-	} catch (Exception e) {
-		// TODO log4j
-	    throw new RuntimeException("Can't read default.properties!");
-	}
-    }
-    
-    public static String get(final String key) {
-	return (String)properties.get(key);
-    }
-    
-    public static Map getAll() {
-	return properties;
-    }
-
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/ExtensionsHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/ExtensionsHandler.java	(revision 1311)
+++ 	(revision )
@@ -1,134 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-package com.fredck.fckeditor;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import com.fredck.fckeditor.tool.Utils;
-
-/**
- * Static object which manages the allowed and denied extensions for each file
- * type. The different extensions are preset by the defaults defined in
- * default.properties.
- * 
- * @version $Id$
- */
-public class ExtensionsHandler {
-
-    private static Map extensionsAllowed = new HashMap();
-    private static Map extensionsDenied = new HashMap();
-
-    static {
-	// load defaults
-	extensionsAllowed.put(Constants.FILE_TYPE_FILE, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.file.extensions.allowed")));
-	extensionsDenied.put(Constants.FILE_TYPE_FILE, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.file.extensions.denied")));
-	extensionsAllowed.put(Constants.FILE_TYPE_IMAGE, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.image.extensions.allowed")));
-	extensionsDenied.put(Constants.FILE_TYPE_IMAGE, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.image.extensions.denied")));
-	extensionsAllowed.put(Constants.FILE_TYPE_FLASH, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.flash.extensions.allowed")));
-	extensionsDenied.put(Constants.FILE_TYPE_FLASH, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.flash.extensions.denied")));
-	extensionsAllowed.put(Constants.FILE_TYPE_MEDIA, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.media.extensions.allowed")));
-	extensionsDenied.put(Constants.FILE_TYPE_MEDIA, Utils
-		.getSet(DefaultPropertiesHolder
-			.get("fckeditor.media.extensions.denied")));
-    }
-
-    /**
-     * Getter for the allowed extensions of a file type.
-     * 
-     * @param type The file type.
-     * @return Set of allowed extensions or an empty set.
-     */
-    public static Set getExtensionsAllowed(final String type) {
-	return (Set) ExtensionsHandler.extensionsAllowed.get(type);
-    }
-
-    /**
-     * Setter for the allowed extensions of a file type.<br>
-     * If 'extensionsList' is null, allowed extensions kept untouched.
-     * 
-     * @param type The file type.
-     * @param extensionsList Required format: <code>ext1&#124;ext2&#124;ext3</code>
-     */
-    public static void setExtensionsAllowed(final String type,
-	    final String extensionsList) {
-	if (extensionsList != null)
-	    ExtensionsHandler.extensionsAllowed.put(type, Utils
-		    .getSet(extensionsList));
-    }
-
-    /**
-     * Getter for the denied extensions of a file type.
-     * 
-     * @param type The file type.
-     * @return Set of denied extensions or an empty set.
-     */
-    public static Set getExtensionsDenied(final String type) {
-	return (Set) ExtensionsHandler.extensionsDenied.get(type);
-    }
-
-    /**
-     * Setter for the denied extensions of a file type.<br>
-     * If 'extensionsList' is null, denied extensions kept untouched.
-     * 
-     * @param type The file type.
-     * @param extensionsList Required format: <code>ext1&#124;ext2&#124;ext3</code>
-     */
-    public static void setExtensionsDenied(final String type,
-	    final String extensionsList) {
-	if (extensionsList != null)
-	    ExtensionsHandler.extensionsDenied.put(type, Utils
-		    .getSet(extensionsList));
-    }
-
-    /**
-     * Checks, if an extension is allowed for a file type.
-     * 
-     * @param type
-     * @param extension
-     * @return True, false.
-     */
-    public static boolean isAllowed(final String type, final String extension) {
-	String ext = extension.toLowerCase();
-	Set allowed = (Set) extensionsAllowed.get(type);
-	Set denied = (Set) extensionsDenied.get(type);
-	if (allowed.isEmpty())
-	    return (denied.contains(ext)) ? false : true;
-	if (denied.isEmpty())
-	    return (allowed.contains(ext)) ? true : false;
-	return false;
-    }
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/FCKeditor.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/FCKeditor.java	(revision 1311)
+++ 	(revision )
@@ -1,320 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-
-package com.fredck.fckeditor;
-
-import javax.servlet.http.HttpServletRequest;
-
-import com.fredck.fckeditor.tool.Compatibility;
-
-/**
- * FCKeditor control class.<br>
- * It's the container for all properties and the class that generate the output based on browser capabilities and
- * configurations passed by the developer.
- * 
- * @version $Id$
- */
-public class FCKeditor {
-
-    private FCKeditorConfigurations oConfig;
-    private String instanceName;
-    private String value;
-    private String basePath;
-    private String toolbarSet;
-    private String width;
-    private String height;
-
-    private HttpServletRequest request;
-
-    /**
-     * Initialize the object setting all basic configurations.<br>
-     * 
-     * The basePath is context root + {@link ConfigurationHandler#getFckEditorDir()}.
-     * 
-     * @param request
-     *                request object
-     * @param instanceName
-     *                unique name
-     * @param width
-     *                width
-     * @param height
-     *                height
-     * @param toolbarSet
-     *                toolbarSet name
-     * @param value
-     *                initial value
-     */
-    public FCKeditor(final HttpServletRequest request, final String instanceName, final String width,
-	    final String height, final String toolbarSet, final String value) {
-	this.request = request;
-	// TODO muss das mit einem Slash abgeschlossen werden?
-	this.basePath = request.getContextPath() + ConfigurationHandler.getFckEditorDir() + "/";
-	this.instanceName = instanceName;
-
-	// set defaults, if required
-	this.value = (value == null) ? "" : value;
-	this.toolbarSet = (toolbarSet == null) ? ConfigurationHandler.getFckEditorToolbarSet() : toolbarSet;
-	this.width = (width == null) ? ConfigurationHandler.getFckEditorWidth() : width;
-	this.height = (height == null) ? ConfigurationHandler.getFckEditorHeight() : height;
-
-	oConfig = new FCKeditorConfigurations();
-    }
-
-    /**
-     * Just a wrapper to {@link FCKeditor}.
-     * 
-     * @param req
-     *                request object
-     */
-    // TODO Konstruktor würde ich auf deprecated setzten
-    /*
-     * Grund: Laut Server Side Integeratin sollte auf jeden Fall instanceName übergeben
-     */
-    public FCKeditor(HttpServletRequest req) {
-	this(req, null, null, null, null, null);
-    }
-
-    /**
-     * Just a wrapper to {@link FCKeditor}.
-     * 
-     * @param req
-     *                request object
-     * @param parInstanceName
-     *                unique name
-     */
-    public FCKeditor(HttpServletRequest req, String parInstanceName) {
-	this(req, parInstanceName, null, null, null, null);
-    }
-
-    /**
-     * Get the unique name of the editor
-     * 
-     * @return name
-     */
-    public String getInstanceName() {
-	return instanceName;
-    }
-
-    /**
-     * Set the unique name of the editor
-     * 
-     * @param value
-     *                name
-     */
-    public void setInstanceName(String value) {
-	instanceName = value;
-    }
-
-    /**
-     * Get the initial value to be edited.<br>
-     * In HTML code
-     * 
-     * @return value
-     */
-    public String getValue() {
-	return value;
-    }
-
-    /**
-     * Set the initial value to be edited.<br>
-     * In HTML code
-     * 
-     * @param value
-     *                value
-     */
-    public void setValue(String value) {
-	this.value = value;
-    }
-
-    /**
-     * Get the dir where the FCKeditor files reside on the server
-     * 
-     * @return path
-     */
-    public String getBasePath() {
-	return basePath;
-    }
-
-    /**
-     * Set the dir where the FCKeditor files reside on the server.<br>
-     * <b>Remarks</b>:<br>
-     * Avoid using relative paths. It is preferable to set the base path starting from the root (/).<br>
-     * Always finish the path with a slash (/).
-     * 
-     * @param value
-     *                path
-     */
-    public void setBasePath(String value) {
-	basePath = value;
-    }
-
-    /**
-     * Get the name of the toolbar to display
-     * 
-     * @return toolbar name
-     */
-    public String getToolbarSet() {
-	return toolbarSet;
-    }
-
-    /**
-     * Set the name of the toolbar to display
-     * 
-     * @param value
-     *                toolbar name
-     */
-    public void setToolbarSet(String value) {
-	toolbarSet = value;
-    }
-
-    /**
-     * Get the width of the textarea
-     * 
-     * @return width
-     */
-    public String getWidth() {
-	return width;
-    }
-
-    /**
-     * Set the width of the textarea
-     * 
-     * @param value
-     *                width
-     */
-    public void setWidth(String value) {
-	width = value;
-    }
-
-    /**
-     * Get the height of the textarea
-     * 
-     * @return height
-     */
-    public String getHeight() {
-	return height;
-    }
-
-    /**
-     * Set the height of the textarea
-     * 
-     * @param value
-     *                height
-     */
-    public void setHeight(String value) {
-	height = value;
-    }
-
-    /**
-     * Get the advanced configuation set.<br>
-     * Adding element to this collection you can override the settings specified in the config.js file.
-     * 
-     * @return configuration collection
-     */
-    public FCKeditorConfigurations getConfig() {
-	return oConfig;
-    }
-
-    /**
-     * Set the advanced configuation set.
-     * 
-     * @param value
-     *                configuration collection
-     */
-    public void setConfig(FCKeditorConfigurations value) {
-	oConfig = value;
-    }
-
-    // TODO Methoden fangen mit Kleinbuchstaben an
-    private String HTMLEncode(String txt) {
-	txt = txt.replaceAll("&", "&amp;");
-	txt = txt.replaceAll("<", "&lt;");
-	txt = txt.replaceAll(">", "&gt;");
-	txt = txt.replaceAll("\"", "&quot;");
-	txt = txt.replaceAll("'", "&#146;");
-	return txt;
-    }
-
-    /**
-     * Generate the HTML Code for the editor. <br>
-     * Evalute the browser capabilities and generate the editor if compatible, or a simple textarea otherwise.
-     * 
-     * @return html code
-     */
-    public String create() {
-    	// TODO Eventuell StringBuilder, da der schneller ist
-    	// Wie sind dann aber in Multiuser env
-    	StringBuffer strEditor = new StringBuffer();
-
-	strEditor.append("<div>");
-	String encodedValue = HTMLEncode(value);
-
-	if (Compatibility.check(request.getHeader("user-agent"))) {
-
-		 // TODO Variablen separat hinzufügen
-		strEditor.append("<input type=\"hidden\" id=\"" + instanceName + "\" name=\"" + instanceName
-		    + "\" value=\"" + encodedValue + "\">");
-
-	    strEditor.append(createConfigHTML());
-	    strEditor.append(createIFrameHTML());
-
-	} else {
-	    // TODO s.o.
-		// TODO lowercase HTML tags nutzen
-		strEditor.append("<TEXTAREA name=\"" + instanceName + "\" rows=\"4\" cols=\"40\" style=\"WIDTH: " + width
-		    + "; HEIGHT: " + height + "\" wrap=\"virtual\">" + encodedValue + "</TEXTAREA>");
-	}
-	strEditor.append("</div>");
-	return strEditor.toString();
-    }
-
-    private String createConfigHTML() {
-	String configStr = oConfig.getUrlParams();
-	if (!configStr.equals(""))
-	    configStr = configStr.substring(1);
-
-	return "<input type=\"hidden\" id=\"" + instanceName + "___Config\" value=\"" + configStr + "\">";
-    }
-
-    private String createIFrameHTML() {
-	// TODO eventuell mit neuer Pfadstruktur untersuchen
-    	String sLink = basePath + "editor/fckeditor.html?InstanceName=" + instanceName;
-
-	if (!toolbarSet.equals(""))
-	    sLink += "&Toolbar=" + toolbarSet;
-
-	 // TODO Variablen separat hinzufügen
-	return "<iframe id=\"" + instanceName + "___Frame\" src=\"" + sLink + "\" width=\"" + width + "\" height=\""
-		+ height + "\" frameborder=\"no\" scrolling=\"no\"></iframe>";
-    }
-    
-    /**
-     * Checks the compatibility of the browser of the current request.
-     * 
-     * @return True, if compatible or false.
-     * @see {@link Compatibility#check(String)}
-     */
-    public boolean isCompatibleBrowser() {
-	if (request != null)
-	    return Compatibility.check(request.getHeader("user-agent"));
-	return false;
-    }
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/FCKeditorConfigurations.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/FCKeditorConfigurations.java	(revision 1311)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-
-package com.fredck.fckeditor;
-
-import java.net.URLEncoder;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Contains the configuration settings for the FCKEditor.<br>
- * Adding element to this collection you can override the settings specified in
- * the config.js file.
- * 
- * @version $Id$
- */
-public class FCKeditorConfigurations extends HashMap {
-
-    /**
-     * Initialize the configuration collection
-     */
-    public FCKeditorConfigurations() {
-	super();
-    }
-
-    /**
-     * Generate the url parameter sequence used to pass this configuration to
-     * the editor.
-     * 
-     * @return html endocode sequence of configuration parameters
-     */
-    public String getUrlParams() {
-	StringBuffer osParams = new StringBuffer();
-
-	for (Iterator i = this.entrySet().iterator(); i.hasNext();) {
-	    Map.Entry entry = (Map.Entry) i.next();
-	    if (entry.getValue() != null) {
-		osParams.append("&");
-		osParams.append(encodeConfig(entry.getKey().toString()));
-		osParams.append("=");
-		osParams.append(encodeConfig(entry.getValue().toString()));
-	    }
-	}
-	return osParams.toString();
-    }
-
-    /**
-     * @see URLEncoder#encode(String, String)
-     * @param txt
-     * @return
-     */
-    @Deprecated
-    private String encodeConfig(String txt) {
-	txt = txt.replaceAll("&", "%26");
-	txt = txt.replaceAll("=", "%3D");
-	txt = txt.replaceAll("\"", "%22");
-	return txt;
-    }
-
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/IBaseDirProvider.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/IBaseDirProvider.java	(revision 1311)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-package com.fredck.fckeditor;
-
-/**
- * This interface has to be implemented by the class, which provides the user
- * dir. <br>
- * E.g. this class could set construct the user depended on a session.
- * 
- * @version $Id:IBaseDirProvider.java 1099 2007-11-06 15:01:50Z th-schwarz $
- */
-public interface IBaseDirProvider {
-
-    /**
-     * @return Base dir for user files. It's relative to the context root (no
-     *         leading or ending /).
-     */
-    public String getDir();
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/connector/ConnectorServlet.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/connector/ConnectorServlet.java	(revision 1311)
+++ 	(revision )
@@ -1,313 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-package com.fredck.fckeditor.connector;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.FileItemFactory;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.filefilter.DirectoryFileFilter;
-import org.apache.commons.io.filefilter.FileFileFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import com.fredck.fckeditor.ConfigurationHandler;
-import com.fredck.fckeditor.tool.Utils;
-
-/**
- * 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>
- * 
- * @version $Id$
- */
-public class ConnectorServlet extends HttpServlet {
-
-    private static final long serialVersionUID = -5742008970929377161L;
-    private final Logger logger = LoggerFactory.getLogger(ConnectorServlet.class); 
-
-    
-    /**
-     * Initialize the servlet.<br>
-     * Retrieve from the servlet configuration the "baseDir" which is the root of the file repository.
-     */
-    public void init() throws ServletException {
-	if (getInitParameter("baseDir") != null)
-	    ConfigurationHandler.setBaseDir(getInitParameter("baseDir"));
-	String realBaseDir = getServletContext().getRealPath(ConfigurationHandler.getBaseDir());
-	File baseFile = new File(realBaseDir);
-	if (!baseFile.exists()) {
-	    baseFile.mkdirs();
-	}
-	logger.info("*** Connector Servlet initialized!");
-    }
-
-    /**
-     * 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 {
-	logger.debug("Entered #doGet.");
-	
-	response.setCharacterEncoding("UTF-8");
-	response.setContentType("application/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");
-
-	// TODO untersuchen wie es vom Res Browser kommt
-	String currentPath = ConfigurationHandler.getBaseDir() + "/" + typeStr + currentFolderStr;
-	currentPath = Utils.replaceAll(currentPath, "//", "/");
-	String currentDirPath = getServletContext().getRealPath(currentPath);
-
-	File currentDir = new File(currentDirPath);
-	if (!currentDir.exists()) {
-	    currentDir.mkdir();
-	}
-
-	Document document = null;
-	try {
-	    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-	    DocumentBuilder builder = factory.newDocumentBuilder();
-	    document = builder.newDocument();
-	} catch (ParserConfigurationException pce) {
-	    logger.error("Error while parsing DOM: " + pce.getLocalizedMessage(), pce);
-	}
-
-	Node root = CreateCommonXml(document, commandStr, typeStr, currentFolderStr, request.getContextPath()
-		+ currentPath);
-	logger.debug("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) {
-	    logger.error("Error while transforming DOM to HttpServletResponse: " + ex.getMessage(), ex);
-	}
-
-	out.flush();
-	out.close();
-	logger.debug("Successfull ended #doGet!");
-    }
-
-    /**
-     * 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 {
-	logger.debug("Entered #doPost.");
-
-	response.setCharacterEncoding("UTF-8");
-	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 = ConfigurationHandler.getBaseDir() + "/" + typeStr + currentFolderStr;
-	currentPath = Utils.replaceAll(currentPath, "//", "/");
-	String currentDirPath = getServletContext().getRealPath(currentPath);
-
-	logger.debug("current path dir: " + currentDirPath);
-	
-	String retVal = "0";
-	String newName = "";
-
-	if (!commandStr.equals("FileUpload"))
-	    retVal = "203";
-	else {
-	    FileItemFactory factory = new DiskFileItemFactory();
-	    ServletFileUpload upload = new ServletFileUpload(factory);
-	    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 baseName = FilenameUtils.getBaseName(filename);// Utils.getNameWithoutExtension(filename);
-		String ext = FilenameUtils.getExtension(filename); // Utils.getExtension(fileName);
-		File pathToSave = new File(currentDirPath, filename);
-		int counter = 1;
-		while (pathToSave.exists()) {
-		    newName = baseName + "(" + counter + ")" + "." + ext;
-		    retVal = "201";
-		    pathToSave = new File(currentDirPath, 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();
-	
-	logger.debug("Successfull ended #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((FileFilter) DirectoryFileFilter.DIRECTORY);
-	for (File file : fileList) {
-	    Element myEl = doc.createElement("Folder");
-	    myEl.setAttribute("name", file.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((FileFilter) FileFileFilter.FILE);
-
-	for (File file : fileList) {
-	    Element myEl = doc.createElement("File");
-	    myEl.setAttribute("name", file.getName());
-	    myEl.setAttribute("size", String.valueOf(file.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;
-    }
-
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/connector/package.html
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/connector/package.html	(revision 1311)
+++ 	(revision )
@@ -1,74 +1,0 @@
-<!--
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * JavaDoc connector documentation.
--->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-</head>
-<body bgcolor="white">
-
-Connector used by the FCKeditor to list and create resources on the server.
-
-<h2>Package Specification</h2>
-
-This servlet is access directly from the file browser in the FCKeditor.<br>
-To make everything work correctly you have to add the following piece of code in your application's web.xml
-<br>
-<pre>
-	&lt;servlet&gt;
-		&lt;servlet-name&gt;Connector&lt;/servlet-name&gt;
-		&lt;servlet-class&gt;com.fredck.FCKeditor.connector.ConnectorServlet&lt;/servlet-class&gt;
-		&lt;init-param&gt;
-			&lt;param-name&gt;baseDir&lt;/param-name&gt;
-			&lt;param-value&gt;/UserFiles/&lt;/param-value&gt;
-		&lt;/init-param&gt;
-		&lt;init-param&gt;
-			&lt;param-name&gt;debug&lt;/param-name&gt;
-			&lt;param-value&gt;false&lt;/param-value&gt;
-		&lt;/init-param&gt;
-		&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
-	&lt;/servlet&gt;
-
-	&lt;servlet-mapping&gt;
-		&lt;servlet-name&gt;Connector&lt;/servlet-name&gt;
-		&lt;url-pattern&gt;/editor/filemanager/browser/default/connectors/jsp/connector&lt;/url-pattern&gt;
-	&lt;/servlet-mapping&gt;
-</pre>
-<br>
-And put in the fckconfig.js the following line:
-<pre>
-FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" ;
-FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" ;
-FCKConfig.FlashBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector" ;
-</pre>
-Also, since the servlet manage a file upload using the Jakarta Common fileupload library, you need to put in your <code>WEB-INF/lib/</code> the <code>commons-fileupload.jar</code>.
-<h2>Related Documentation</h2>
-
-For overviews, tutorials, examples, guides, and tool documentation, please see:
-<ul>
-  <li>_sample/jsp directory for example of how to implement FCKeditor in your application
-</ul>
-
-<!-- Put @see and @since tags down here. -->
-
-</body>
-</html>
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/package.html
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/package.html	(revision 1311)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<!--
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * JavaDoc package documentation.
--->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-</head>
-<body bgcolor="white">
-
-Core objects to manage the FCKeditor text input form.
-Java Integration Module 2.4.
-
-<h2>Related Documentation</h2>
-
-For overviews, tutorials, examples, guides, and tool documentation, please see:
-<ul>
-  <li><a href="http://www.fckeditor.net/">Official web site of FCKeditor</a>
-</ul>
-
-<!-- Put @see and @since tags down here. -->
-
-</body>
-</html>
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tags/FCKeditorTag.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tags/FCKeditorTag.java	(revision 1311)
+++ 	(revision )
@@ -1,692 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
- 
-package com.fredck.fckeditor.tags;
-
-import java.io.IOException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.JspWriter;
-import javax.servlet.jsp.tagext.BodyContent;
-import javax.servlet.jsp.tagext.BodyTagSupport;
-
-import com.fredck.fckeditor.FCKeditor;
-
-/**
- * FCKeditor Tag class to access the {@linkplain com.fredck.FCKeditor.FCKeditor container}.<br>
- *<p>
- * <b>Simple usage</b>:
- * <pre>
- *	&lt;FCK:editor
- *		id="EditorAccessibility"
- *		width="80%"
- *		height="120"
- *		toolbarSet="Accessibility"
- *	"&gt;This is another test. &lt;BR&gt;&lt;BR&gt;The "Second" row.&lt;/BR&gt;&lt;/FCK:editor"&gt;
- * </pre>
- *
- *<p>In this example we set all the attribute for the fckedit tag.
- *
- *<p>
- *  <b>Advanced usage of the tag</b>:
- *  <pre>
- *	&lt;FCK:editor id="EditorDefault" basePath="/FCKeditor/"
- *		styleNames=";Style 1;Style 2; Style 3" 
- *		fontNames=";Arial;Courier New;Times New Roman;Verdana" &gt;
- *		This is some &lt;B&gt;sample text&lt;/B&gt;.
- *	&lt;/FCK:editor&gt;
- *  </pre>
- * In this example we set the id and the basePath of the editor (since it is /FCKeditor/
- * we could have omitted it because it's already the default value).<br>
- * Then we used the the optional attributes to set some advanced configuration settings.
- */
-public class FCKeditorTag extends BodyTagSupport  {
-	
-	private static final long serialVersionUID = -173091731589866140L;
-	private String id;
-	private String value = "";
-	private String basePath = null;
-	private String toolbarSet = null;
-	private String width = null;
-	private String height = null;
-	private String customConfigurationsPath = null;
-	private String editorAreaCSS = null;
-	private String baseHref = null;
-	private String skinPath = null;
-	private String pluginsPath = null;
-	private String fullPage = null;
-	private String debug = null;	
-	private String autoDetectLanguage = null;
-	private String defaultLanguage = null;
-	private String contentLangDirection = null;
-	private String enableXHTML = null;
-	private String enableSourceXHTML = null;
-	private String fillEmptyBlocks = null;
-	private String formatSource = null;
-	private String formatOutput = null;
-	private String formatIndentator = null;
-	private String geckoUseSPAN = null;
-	private String startupFocus = null;
-	private String forcePasteAsPlainText = null;
-	private String forceSimpleAmpersand = null;
-	private String tabSpaces = null;
-	private String useBROnCarriageReturn = null;
-	private String toolbarStartExpanded = null;
-	private String toolbarCanCollapse = null;
-	private String fontColors = null;
-	private String fontNames = null;
-	private String fontSizes = null;
-	private String fontFormats = null;
-	private String stylesXmlPath = null;
-	private String linkBrowserURL = null;
-	private String imageBrowserURL = null;
-	private String flashBrowserURL = null;
-	private String linkUploadURL = null;
-	private String imageUploadURL = null;
-	private String flashUploadURL = null;
-	
-
-
-
-   /**
-     * The underlying FCKeditor object
-     *
-     */		
-	protected FCKeditor fcked = null;
-
-
-    /**
-     * Set the unique id of the editor
-     *
-     * @param value name
-     */	
-	public void setId(String value) {
-		id=value;
-	}
-
-    /**
-     * Set the dir where the FCKeditor files reside on the server
-     *
-     * @param value path
-     */		
-	public void setBasePath(String value) {
-		basePath=value;
-	}
-
-    /**
-     * Set the name of the toolbar to display
-     *
-     * @param value toolbar name
-     */		
-	public void setToolbarSet(String value) {
-		toolbarSet=value;
-	}
-
-    /**
-     * Set the width of the textarea
-     *
-     * @param value width
-     */		
-	public void setWidth(String value) {
-		width=value;
-	}
-
-    /**
-     * Set the height of the textarea
-     *
-     * @param value height
-     */		
-	public void setHeight(String value) {
-		height=value;
-	}
-
-	/**
-	 * Set the path of a custom file that can override some configurations.<br>
-	 * It is recommended to use absolute paths (starting with /), like "/myfckconfig.js".
-	 *
-	 * @param value path
-	 */
-	public void setCustomConfigurationsPath(String value) {
-		customConfigurationsPath=value;
-	}
-	
-
-	/**
-	 * Set the CSS styles file to be used in the editing area.<br>
-	 * In this way you can point to a file that reflects your web site styles.
-	 *
-	 * @param value path
-	 */
-	public void setEditorAreaCSS(String value) {
-		editorAreaCSS=value;
-	}
-	
-
-	/**
-	 * Base URL used to resolve links (on images, links, styles, etc.).<br>
-	 * For example, if BaseHref is set to 'http://www.fredck.com', an image that points to "/images/Logo.gif" will be interpreted by the editor as "http://www.fredck.com/images/Logo.gif", without touching the "src" attribute of the image.
-	 *
-	 * @param value URL
-	 */
-	public void setBaseHref(String value) {
-		baseHref=value;
-	}
-	
-	
-	/**
-	 * Sets the path to the skin (graphical interface settings) to be used by the editor.
-	 *
-	 * @param value path
-	 */
-	public void setSkinPath(String value) {
-		skinPath=value;
-	}
-	
-	
-	/**
-	 * Sets the base path used when looking for registered plugins.
-	 *
-	 * @param value path
-	 */
-	public void setPluginsPath(String value) {
-		pluginsPath=value;
-	}
-	
-	
-	/**
-	 * Enables full page editing (from &lt;HTML&gt; to &lt;/HTML&gt;).<br>
-	 * It also enables the "Page Properties" toolbar button.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setFullPage(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("fullPage attribute can only be true or false");
-		fullPage=value;
-	}
-	
-	
-	/**
-	 * Enables the debug window to be shown when calling the FCKDebug.Output() function.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setDebug(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("debug attribute can only be true or false");
-		debug=value;
-	}
-	
-	
-	/**
-	 * Tells the editor to automatically detect the user language preferences to adapt its interface language.<br>
-	 * With Internet Explorer, the language configured in the Windows Control Panel is used.<br>
-	 * With Firefox, the browser language is used.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setAutoDetectLanguage(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("autoDetectLanguage attribute can only be true or false: here was " + value);
-		autoDetectLanguage=value;
-	}
-	
-	
-	/**
-	 * Sets the default language used for the editor's interface localization.<br>
-	 * The default language is used when the AutoDetectLanguage options is disabled or when the user language is not available.
-	 *
-	 * @param value language code
-	 */
-	public void setDefaultLanguage(String value) {
-		defaultLanguage=value;
-	}
-	
-	
-	/**
-	 * Sets the direction of the editor area contents.<br>
-	 * The possible values are:
-	 * <ul>
-     * <li>ltr - Left to Right
-     * <li>rtl - Right to Left
-     * </ul>
-	 *
-	 * @param value ltr/rtl
-	 * @throws JspException if value is not ltr or rtl
-	 */
-	public void setContentLangDirection(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("debug attribute can only be ltr or rtl");
-		contentLangDirection=value;
-	}
-	
-	
-	/**
-	 * Tells the editor to process the HTML source to XHTML on form post.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setEnableXHTML(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("enableXHTML attribute can only be true or false");
-		enableXHTML=value;
-	}
-	
-	
-	/**
-	 * Tells the editor to process the HTML source to XHTML when switching from WYSIWYG to Source view
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setEnableSourceXHTML(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("enableSourceXHTML attribute can only be true or false");
-		enableSourceXHTML=value;
-	}
-	
-	
-	/**
-	 * Block elements (like P, DIV, H1, PRE, etc...) are forced to have content (a &amp;nbsp;).<br>
-	 * Empty blocks are "collapsed" by while browsing, so a empty &lt;p&gt;&lt;/p&gt; is not visible.<br>
-	 * While editing, the editor "expand" empty blocks so you can insert content inside then.<br>
-	 * Setting this option to "true" results useful to reflect the same output when browsing and editing.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setFillEmptyBlocks(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("fillEmptyBlocks attribute can only be true or false");
-		fillEmptyBlocks=value;
-	}
-	
-	
-	/**
-	 * The HTML shown by the editor, while switching from WYSIWYG to Source views, will be processed and formatted
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setFormatSource(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("formatSource attribute can only be true or false");
-		formatSource=value;
-	}
-	
-	
-	/**
-	 * The output HTML generated by the editor will be processed and formatted.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setFormatOutput(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("formatOutput attribute can only be true or false");
-		formatOutput=value;
-	}
-	
-	/**
-	 * Sets the characters to be used when indenting the HTML source when formatting it.<BR>
-	 * Useful values are a sequence of spaces ('     ') or a tab char ('\t').
-	 *
-	 * @param value indentator
-	 */
-	public void setFormatIndentator(String value) {
-		formatIndentator=value;
-	}
-	
-	
-	/**
-	 * Tells Gecko browsers to use SPAN instead of &lt;B&gt;, &lt;I&gt; and &lt;U&gt; for bold, italic an underline
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setGeckoUseSPAN(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("GeckoUseSPAN attribute can only be true or false");
-		geckoUseSPAN=value;
-	}
-	
-	
-	/**
-	 * Forces the editor to get the keyboard input focus on startup (page load)
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setStartupFocus(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("startupFocus attribute can only be true or false");
-		startupFocus=value;
-	}
-	
-	
-	/**
-	 * Converts the clipboard contents to pure text on pasting operations
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setForcePasteAsPlainText(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("forcePasteAsPlainText attribute can only be true or false");
-		forcePasteAsPlainText=value;
-	}
-	
-	
-	/**
-	 * Forces the ampersands (&) on tags attributes to not be converted to "&amp;amp;"<BR>
-	 * This conversion is a W3C requirement for XHTML, so it is recommended to leave this option to "false".
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setForceSimpleAmpersand(String value) throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("forceSimpleAmpersand attribute can only be true or false");
-		forceSimpleAmpersand=value;
-	}
-	
-	
-	/**
-	 * Set the number of spaces (&amp;nbsp;) to be inserted when the user hits the "tab" key.<BR>
-	 * This is an Internet Explorer only feature. Other browsers insert spaces automatically by default.
-	 *
-	 * @param value number of spaces
-	 */
-	public void setTabSpaces(String value) {
-		tabSpaces=value;
-	}
-	
-	
-	/**
-	 * Inserts a &lt;BR&gt; tag when the user hits the "enter" key, instead of starting a new paragraph (&lt;P&gt; or &lt;DIV&gt;).<BR>
-	 * This is an Internet Explorer only feature. Other browsers insert the &lt;BR&gt; tag by default.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setUseBROnCarriageReturn(String value)  throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("useBROnCarriageReturn attribute can only be true or false");
-		useBROnCarriageReturn=value;
-	}
-	
-	
-	/**
-	 * The toolbar is Expanded on startup, otherwise it is Collapsed and the user must click on it to show it.
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setToolbarStartExpanded(String value)   throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("ToolbarStartExpanded attribute can only be true or false");
-		toolbarStartExpanded=value;
-	}
-	
-	
-	/**
-	 * Tells the editor that the toolbar can be Collapsed/Expanded by the user when clicking the vertical bar placed on the left of it (on the right for "rtl" languages).
-	 *
-	 * @param value true/false
-	 * @throws JspException if value is not true or false
-	 */
-	public void setToolbarCanCollapse(String value)    throws JspException {
-		if(! value.equals("true") && ! value.equals("false"))
-			throw new JspException("ToolbarCanCollapse attribute can only be true or false");
-		toolbarCanCollapse=value;
-	}
-	
-	
-	/**
-	 * Sets the colors that must be shown in the colors panels (in the toolbar).
-	 *
-	 * @param value colors
-	 */
-	public void setFontColors(String value) {
-		fontColors=value;
-	}
-	
-	
-	/**
-	 * Sets the list of fonts to be shown in the "Font" toolbar command.
-	 *
-	 * @param value fonts
-	 */
-	public void setFontNames(String value) {
-		fontNames=value;
-	}
-	
-	
-	/**
-	 * Sets the list of font sizes to be shown in the "Size" toolbar command.
-	 *
-	 * @param value sizes
-	 */
-	public void setFontSizes(String value) {
-		fontSizes=value;
-	}
-	
-	
-	/**
-	 * Sets the list of formats to be shown in the "Format" toolbar command.
-	 *
-	 * @param value format list
-	 */
-	public void setFontFormats(String value) {
-		fontFormats=value;
-	}
-	
-	
-	/**
-	 * Sets the path to the XML file that has the definitions and rules of the styles used by the "Style" toolbar command
-	 *
-	 * @param value path
-	 */
-	public void setStylesXmlPath(String value) {
-		stylesXmlPath=value;
-	}
-	
-	
-	/**
-	 * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Link" dialog window.<BR>
-	 * In this way, you can create your custom File Browser that is well integrated with your system.
-	 *
-	 * @param value path
-	 */
-	public void setLinkBrowserURL(String value) {
-		linkBrowserURL=value;
-	}
-	
-	
-	/**
-	 * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Image" dialog window.<BR>
-	 * In this way, you can create your custom Image Browser that is well integrated with your system.
-	 *
-	 * @param value path
-	 */
-	public void setImageBrowserURL(String value) {
-		imageBrowserURL=value;
-	}
-
-	/**
-	 * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Flash" dialog window.<BR>
-	 * In this way, you can create your custom Flash Browser that is well integrated with your system.
-	 *
-	 * @param value path
-	 */
-	public void setFlashBrowserURL(String value) {
-		flashBrowserURL=value;
-	}
-
-
-	/**
-	 * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Link" dialog window.<BR>
-	 * In this way, you can create your custom Link Uploader that is well integrated with your system.
-	 *
-	 * @param value path
-	 */
-	public void setLinkUploadURL(String value) {
-		linkUploadURL=value;
-	}
-
-
-	/**
-	 * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Image" dialog window.<BR>
-	 * In this way, you can create your custom Image Uploader that is well integrated with your system.
-	 *
-	 * @param value path
-	 */
-	public void setImageUploadURL(String value) {
-		imageUploadURL=value;
-	}
-
-
-	/**
-	 * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Flash" dialog window.<BR>
-	 * In this way, you can create your custom Flash Uploader that is well integrated with your system.
-	 *
-	 * @param value path
-	 */
-	public void setFlashUploadURL(String value) {
-		flashUploadURL=value;
-	}		
-
-
-	/**
-	 * Initialize the FCKeditor container and set attributes
-	 *
-	 * @return EVAL_BODY_BUFFERED
-	 */
-	public int doStartTag() throws JspException {
-		fcked=new FCKeditor((HttpServletRequest)pageContext.getRequest(),id);
-		if(toolbarSet!=null)
-			fcked.setToolbarSet(toolbarSet);
-		if(basePath!=null)
-			fcked.setBasePath(basePath);
-		if(width!=null)
-			fcked.setWidth(width);
-		if(height!=null)
-			fcked.setHeight(height);
-		if (customConfigurationsPath != null)
-			fcked.getConfig().put("CustomConfigurationsPath",customConfigurationsPath);
-		if (editorAreaCSS != null)
-			fcked.getConfig().put("EditorAreaCSS",editorAreaCSS);
-		if (baseHref != null)
-			fcked.getConfig().put("BaseHref",baseHref);
-		if (skinPath != null)
-			fcked.getConfig().put("SkinPath",skinPath);
-		if (pluginsPath != null)
-			fcked.getConfig().put("PluginsPath",pluginsPath);	
-		if (fullPage != null)
-			fcked.getConfig().put("FullPage",fullPage);
-		if (debug != null)
-			fcked.getConfig().put("Debug",debug);
-		if (autoDetectLanguage != null)
-			fcked.getConfig().put("AutoDetectLanguage",autoDetectLanguage);
-		if (defaultLanguage != null)
-			fcked.getConfig().put("DefaultLanguage",defaultLanguage);
-		if (contentLangDirection != null)
-			fcked.getConfig().put("ContentLangDirection",contentLangDirection);
-		if (enableXHTML != null)
-			fcked.getConfig().put("EnableXHTML",enableXHTML);
-		if (enableSourceXHTML != null)
-			fcked.getConfig().put("EnableSourceXHTML",enableSourceXHTML);
-		if (fillEmptyBlocks != null)
-			fcked.getConfig().put("FillEmptyBlocks",fillEmptyBlocks);
-		if (formatSource != null)
-			fcked.getConfig().put("FormatSource",formatSource);
-		if (formatOutput != null)
-			fcked.getConfig().put("FormatOutput",formatOutput);
-		if (formatIndentator != null)
-			fcked.getConfig().put("FormatIndentator",formatIndentator);
-		if (geckoUseSPAN != null)
-			fcked.getConfig().put("GeckoUseSPAN",geckoUseSPAN);
-		if (startupFocus != null)
-			fcked.getConfig().put("StartupFocus",startupFocus);
-		if (forcePasteAsPlainText != null)
-			fcked.getConfig().put("ForcePasteAsPlainText",forcePasteAsPlainText);
-		if (forceSimpleAmpersand != null)
-			fcked.getConfig().put("ForceSimpleAmpersand",forceSimpleAmpersand);
-		if (tabSpaces != null)
-			fcked.getConfig().put("TabSpaces",tabSpaces);
-		if (useBROnCarriageReturn != null)
-			fcked.getConfig().put("UseBROnCarriageReturn",useBROnCarriageReturn);
-		if (toolbarStartExpanded != null)
-			fcked.getConfig().put("ToolbarStartExpanded",toolbarStartExpanded);
-		if (toolbarCanCollapse != null)
-			fcked.getConfig().put("ToolbarCanCollapse",toolbarCanCollapse);
-		if (fontColors != null)
-			fcked.getConfig().put("FontColors",fontColors);
-		if (fontNames != null)
-			fcked.getConfig().put("FontNames",fontNames);
-		if (fontSizes != null)
-			fcked.getConfig().put("FontSizes",fontSizes);
-		if (fontFormats != null)
-			fcked.getConfig().put("FontFormats",fontFormats);
-		if (stylesXmlPath != null)
-			fcked.getConfig().put("StylesXmlPath",stylesXmlPath);
-		if (linkBrowserURL != null)
-			fcked.getConfig().put("LinkBrowserURL",linkBrowserURL);
-		if (imageBrowserURL != null)
-			fcked.getConfig().put("ImageBrowserURL",imageBrowserURL);
-		if (flashBrowserURL != null)
-			fcked.getConfig().put("FlashBrowserURL",flashBrowserURL);
-		if (linkUploadURL != null)
-			fcked.getConfig().put("LinkUploadURL",linkUploadURL);
-		if (imageUploadURL != null)
-			fcked.getConfig().put("ImageUploadURL",imageUploadURL);
-		if (flashUploadURL != null)
-			fcked.getConfig().put("FlashUploadURL",flashUploadURL);
-				
-		 return EVAL_BODY_BUFFERED;
-	}
-
-	/**
-	 * Retrive initial value to be edited and writes the HTML code in the page
-	 *
-	 * @return SKIP_BODY
-	 * @throws JspException if an error occurs while writing to the out buffer
-	 */	
-	public int doAfterBody()  throws JspException {
-			BodyContent body = getBodyContent();
-			JspWriter writer = body.getEnclosingWriter();
-			String bodyString = body.getString();
-			fcked.setValue(bodyString);
-			try {
-				writer.println(fcked.create());
-			}catch(IOException ioe) {
-				throw new JspException("Error: IOException while writing to the user");
-			}
-			
-			return SKIP_BODY;
-	}
-
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tags/package.html
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tags/package.html	(revision 1311)
+++ 	(revision )
@@ -1,51 +1,0 @@
-<!--
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * JavaDoc FCKeditor lib documentation.
--->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-</head>
-<body bgcolor="white">
-
-JSP Tag to access and modify the FCKeditor objects.
-
-
-<h2>Package Specification</h2>
-
-This taglibrary is compliant to the taglib 1.1 specification.<br>
-To use it put the FCKeditor.jar inside the <code>WEB-INF/lib</code> dir and FCKeditor.tld inside the <code>WEB-INF</code> directory of your website.<br>
-Put the following declaration in each page that use the tags:<br>
-<pre>
-&lt;%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %&gt;
-</pre>
-
-<h2>Related Documentation</h2>
-
-For overviews, tutorials, examples, guides, and tool documentation, please see:
-<ul>
-  <li>_sample/jsp directory for example of how to implement FCKeditor in your application
-</ul>
-
-<!-- Put @see and @since tags down here. -->
-
-</body>
-</html>
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tool/Compatibility.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tool/Compatibility.java	(revision 1311)
+++ 	(revision )
@@ -1,93 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-package com.fredck.fckeditor.tool;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Compatibility check.
- *
- * @version $Id$
- */
-public class Compatibility {
-
-    /**
-     * Checks, if a browser's user agent string is compatible for the FCKeditor.
-     * 
-     * @param userAgentString
-     * @return true, if compatible
-     */
-    public static boolean check(final String userAgentString) {
-        if (userAgentString == null || userAgentString.length() < 1)
-            return false;
-    
-        float version;
-    
-        // IE 5.5+, check special keys like 'Opera' and 'mac', because there are some 
-        // other browsers, containing 'MSIE' in there agent string!
-        if (userAgentString.indexOf("Opera") < 0 && userAgentString.indexOf("mac") < 0) {
-            version = getBrowserVersion(userAgentString, ".*MSIE ([\\d]+.[\\d]+).*");
-            if (version != -1f && version >= 5.5f)
-        	return true;
-        }
-    
-        // Gecko
-        version = getBrowserVersion(userAgentString, ".*Gecko/([\\d]+).*");
-        if (version != -1f && version >= 20030210f)
-            return true;
-    
-        // Opera 9.5+
-        version = getBrowserVersion(userAgentString, "Opera/([\\d]+.[\\d]+).*");
-        if (version != -1f && version >= 9.5f)
-            return true;
-    
-        // Safari 3+
-        version = getBrowserVersion(userAgentString, ".*AppleWebKit/([\\d]+).*");
-        if (version != -1f && version >= 522f)
-            return true;
-    
-        return false;
-    }
-
-    /**
-     * Helper method to get the the browser version from 'userAgent' with the
-     * regular expression 'regex'. The first group of the matches has to be the
-     * version number!
-     * 
-     * @param userAgent
-     * @param regex
-     * @return The browser version, or -1f
-     */
-    private static float getBrowserVersion(final String userAgent,
-            final String regex) {
-        Pattern pattern = Pattern.compile(regex);
-        Matcher matcher = pattern.matcher(userAgent);
-        if (matcher.matches()) {
-            try {
-        	return Float.parseFloat(matcher.group(1));
-            } catch (NumberFormatException e) {
-            }
-        }
-        return -1f;
-    }
-
-}
Index: Keditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tool/Utils.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/com/fredck/fckeditor/tool/Utils.java	(revision 1311)
+++ 	(revision )
@@ -1,119 +1,0 @@
-/*
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- * 
- * == BEGIN LICENSE ==
- * 
- * Licensed under the terms of any of the following licenses at your
- * choice:
- * 
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- * 
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- * 
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- * 
- * == END LICENSE ==
- */
-package com.fredck.fckeditor.tool;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-/**
- * Some static helper methods.
- * 
- * @author <a href="mailto:th-schwarz@users.sourceforge.net">Thilo Schwarz</a>
- */
-public class Utils {
-
-    /**
-     * Constructs a set of uppercased strings from a 'delimiter' separated string.
-     * 
-     * @param stringList
-     * @param delimiter
-     *                The delimiter. It shouldn't be empty!
-     * @return An emtpy list, if 'stringList' is empty, or an uppercased set of strings.
-     * @throws IllegalArgumentException
-     *                 if 'delimiter' is empty.
-     */
-    public static Set getSet(final String stringList, final String delimiter) {
-	if (isEmpty(delimiter))
-	    throw new IllegalArgumentException("Argument 'delimiter' shouldn't be empty!");
-	if (stringList == null || isEmpty(stringList))
-	    return new HashSet();
-
-	Set set = new HashSet();
-	StringTokenizer st = new StringTokenizer(stringList, delimiter);
-	while (st.hasMoreTokens()) {
-	    String tmp = st.nextToken();
-	    if (isNotEmpty(tmp)) // simple empty filter
-		set.add(tmp.toLowerCase());
-	}
-	return set;
-    }
-
-    /**
-     * Just a wrapper to {@link #getSet(String, String)} for using '&#124;' as delimiter.
-     */
-    public static Set getSet(final String stringlist) {
-	return getSet(stringlist, "|");
-    }
-
-    /**
-     * Checks if a string is null or empty.
-     * 
-     * @param str
-     *                to check
-     * @return <code>true</code> if the String is empty or null
-     */
-    public static boolean isEmpty(final String str) {
-	return str == null || str.length() == 0;
-    }
-
-    /**
-     * Just a wrapper to {@link #isEmpty(String)}.
-     * 
-     * @param str
-     * @return <code>true</code> if the String is not empty and not nul
-     */
-    public static boolean isNotEmpty(final String str) {
-	return !isEmpty(str);
-    }
-
-    /**
-     * Replaces all 'search' with 'replacement' in 'string'.
-     * 
-     * <pre>
-     * Utils.replaceAll(null, *, *)		= &quot;&quot;
-     * Utils.replaceAll(&quot;&quot;, *, *)		= &quot;&quot;
-     * Utils.replaceAll(&quot;foo&quot;, null, *)	= &quot;foo&quot;
-     * Utils.replaceAll(&quot;foo&quot;, &quot;o&quot;, &quot;a&quot;)	= &quot;faa&quot;
-     * </pre>
-     * 
-     * @param string
-     * @param search
-     * @param replacement
-     * @return
-     */
-    public static String replaceAll(final String string, final String search, final String replacement) {
-	if (isEmpty(string))
-	    return "";
-	if (isEmpty(search))
-	    return string;
-	if (string.indexOf(search) == -1)
-	    return string;
-	StringBuffer strb = new StringBuffer(string);
-	int pos = strb.indexOf(search);
-
-	while (pos != -1) {
-	    strb.replace(pos, pos + search.length(), replacement);
-	    pos = strb.indexOf(search);
-	}
-	return strb.toString();
-    }
-}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ConfigurationHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ConfigurationHandler.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ConfigurationHandler.java	(revision 1312)
@@ -0,0 +1,157 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package com.fredck.fckeditor;
+
+/**
+ * Static handler object, which provides getters and setters for basic values like fckeditor dir, base dir (user dir)
+ * and defaults for height, width and toolbar of the editor. All values are preset by the defaults defined in
+ * default.properties. This object is used everywhere these values are needed. <br />
+ * If the {@link IBaseDirProvider} is set, {@link #getBaseDir()} is calling {@link IBaseDirProvider#getDir()} to get the
+ * user dir.
+ * 
+ * @version $Id:ConfigurationHandler.java 1099 2007-11-06 15:01:50Z th-schwarz $´
+ */
+public class ConfigurationHandler {
+    private static String baseDir;
+
+    private static IBaseDirProvider baseDirProvider = null;
+
+    private static String fckEditorDir;
+
+    private static String fckEditorHeight;
+
+    private static String fckEditorWidth;
+
+    private static String fckEditorToolbarSet;
+
+    static {
+	// load defaults
+	baseDir = DefaultPropertiesHolder.get("fckeditor.basedir");
+	fckEditorDir = DefaultPropertiesHolder.get("fckeditor.dir");
+	fckEditorWidth = DefaultPropertiesHolder.get("fckeditor.width");
+	fckEditorHeight = DefaultPropertiesHolder.get("fckeditor.height");
+	fckEditorToolbarSet = DefaultPropertiesHolder.get("fckeditor.toolbarset");
+    }
+
+    /**
+     * Getter for the base dir (using for user files).
+     * 
+     * @return If the {@link IBaseDirProvider} is set, then it's dir getter is called, or base dir.
+     */
+    public static String getBaseDir() {
+	return (baseDirProvider != null) ? baseDirProvider.getDir() : baseDir;
+    }
+
+    /**
+     * Setter for the base dir (using for user files).
+     * 
+     * @param baseDir
+     *                relative to the context root (no leading or ending /).
+     */
+    public static void setBaseDir(final String baseDir) {
+	ConfigurationHandler.baseDir = baseDir;
+    }
+
+    /**
+     * Getter for the {@link IBaseDirProvider}.
+     * 
+     * @param baseDirProvider
+     */
+    public static void setBaseDirProvider(final IBaseDirProvider baseDirProvider) {
+	ConfigurationHandler.baseDirProvider = baseDirProvider;
+    }
+
+    /**
+     * Getter for the dir of the fckeditor.
+     * 
+     * @return Dir of the fckeditor relative to the context root.
+     */
+    public static String getFckEditorDir() {
+	return fckEditorDir;
+    }
+
+    /**
+     * Setter for the dir of the fckeditor.
+     * 
+     * @param fckEditorDir
+     *                relative to the context root (no leading or ending /).
+     */
+    public static void setFckEditorDir(final String fckEditorDir) {
+	ConfigurationHandler.fckEditorDir = fckEditorDir;
+    }
+
+    /**
+     * Getter for the default height of the fckeditor.
+     * 
+     * @return Default height of the fckeditor.
+     */
+    public static String getFckEditorHeight() {
+	return fckEditorHeight;
+    }
+
+    /**
+     * Setter for the default height of the fckeditor.
+     * 
+     * @param fckEditorHeight
+     *                the default height of the fckeditor.
+     */
+    public static void setFckEditorHeight(final String fckEditorHeight) {
+	ConfigurationHandler.fckEditorHeight = fckEditorHeight;
+    }
+
+    /**
+     * Getter for the default width of the fckeditor.
+     * 
+     * @return Default width of the fckeditor.
+     */
+    public static String getFckEditorWidth() {
+	return fckEditorWidth;
+    }
+
+    /**
+     * Setter for the default width of the fckeditor.
+     * 
+     * @param fckEditorWidth
+     *                the default width of the fckeditor.
+     */
+    public static void setFckEditorWidth(final String fckEditorWidth) {
+	ConfigurationHandler.fckEditorWidth = fckEditorWidth;
+    }
+
+    /**
+     * Getter of the name of the default toolbarset of the fckeditor.
+     * 
+     * @return Name of the default toolbar set.
+     */
+    public static String getFckEditorToolbarSet() {
+	return fckEditorToolbarSet;
+    }
+
+    /**
+     * Getter of the name of the default toolbarset of the fckeditor.
+     * 
+     * @param fckEditorToolbarSet
+     *                the name of the toolbarset.
+     */
+    public static void setFckEditorToolbarSet(final String fckEditorToolbarSet) {
+	ConfigurationHandler.fckEditorToolbarSet = fckEditorToolbarSet;
+    }
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/Constants.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/Constants.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/Constants.java	(revision 1312)
@@ -0,0 +1,34 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package com.fredck.fckeditor;
+
+/**
+ * Some global constants.
+ *
+ * @version $Id$
+ */
+public class Constants {
+	
+    public static final String FILE_TYPE_FILE = "File";
+    public static final String FILE_TYPE_IMAGE = "Image";
+    public static final String FILE_TYPE_FLASH = "Flash";
+    public static final String FILE_TYPE_MEDIA = "Media";
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/DefaultPropertiesHolder.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/DefaultPropertiesHolder.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/DefaultPropertiesHolder.java	(revision 1312)
@@ -0,0 +1,58 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+package com.fredck.fckeditor;
+
+import java.io.BufferedInputStream;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Holds the global properties. Defaults are read from a property file. With a
+ * setter methode you can overwrite defaults or set new one.
+ * 
+ * @version $Id$
+ */
+public class DefaultPropertiesHolder {
+    private static Map properties = new Hashtable();
+    
+    static {
+	try {
+	    Properties props = new Properties();
+		props.load(new BufferedInputStream(DefaultPropertiesHolder.class
+		        .getResourceAsStream("default.properties")));
+	    properties = props;
+	} catch (Exception e) {
+		// TODO log4j
+	    throw new RuntimeException("Can't read default.properties!");
+	}
+    }
+    
+    public static String get(final String key) {
+	return (String)properties.get(key);
+    }
+    
+    public static Map getAll() {
+	return properties;
+    }
+
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ExtensionsHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ExtensionsHandler.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ExtensionsHandler.java	(revision 1312)
@@ -0,0 +1,134 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package com.fredck.fckeditor;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import com.fredck.fckeditor.tool.Utils;
+
+/**
+ * Static object which manages the allowed and denied extensions for each file
+ * type. The different extensions are preset by the defaults defined in
+ * default.properties.
+ * 
+ * @version $Id$
+ */
+public class ExtensionsHandler {
+
+    private static Map extensionsAllowed = new HashMap();
+    private static Map extensionsDenied = new HashMap();
+
+    static {
+	// load defaults
+	extensionsAllowed.put(Constants.FILE_TYPE_FILE, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.file.extensions.allowed")));
+	extensionsDenied.put(Constants.FILE_TYPE_FILE, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.file.extensions.denied")));
+	extensionsAllowed.put(Constants.FILE_TYPE_IMAGE, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.image.extensions.allowed")));
+	extensionsDenied.put(Constants.FILE_TYPE_IMAGE, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.image.extensions.denied")));
+	extensionsAllowed.put(Constants.FILE_TYPE_FLASH, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.flash.extensions.allowed")));
+	extensionsDenied.put(Constants.FILE_TYPE_FLASH, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.flash.extensions.denied")));
+	extensionsAllowed.put(Constants.FILE_TYPE_MEDIA, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.media.extensions.allowed")));
+	extensionsDenied.put(Constants.FILE_TYPE_MEDIA, Utils
+		.getSet(DefaultPropertiesHolder
+			.get("fckeditor.media.extensions.denied")));
+    }
+
+    /**
+     * Getter for the allowed extensions of a file type.
+     * 
+     * @param type The file type.
+     * @return Set of allowed extensions or an empty set.
+     */
+    public static Set getExtensionsAllowed(final String type) {
+	return (Set) ExtensionsHandler.extensionsAllowed.get(type);
+    }
+
+    /**
+     * Setter for the allowed extensions of a file type.<br>
+     * If 'extensionsList' is null, allowed extensions kept untouched.
+     * 
+     * @param type The file type.
+     * @param extensionsList Required format: <code>ext1&#124;ext2&#124;ext3</code>
+     */
+    public static void setExtensionsAllowed(final String type,
+	    final String extensionsList) {
+	if (extensionsList != null)
+	    ExtensionsHandler.extensionsAllowed.put(type, Utils
+		    .getSet(extensionsList));
+    }
+
+    /**
+     * Getter for the denied extensions of a file type.
+     * 
+     * @param type The file type.
+     * @return Set of denied extensions or an empty set.
+     */
+    public static Set getExtensionsDenied(final String type) {
+	return (Set) ExtensionsHandler.extensionsDenied.get(type);
+    }
+
+    /**
+     * Setter for the denied extensions of a file type.<br>
+     * If 'extensionsList' is null, denied extensions kept untouched.
+     * 
+     * @param type The file type.
+     * @param extensionsList Required format: <code>ext1&#124;ext2&#124;ext3</code>
+     */
+    public static void setExtensionsDenied(final String type,
+	    final String extensionsList) {
+	if (extensionsList != null)
+	    ExtensionsHandler.extensionsDenied.put(type, Utils
+		    .getSet(extensionsList));
+    }
+
+    /**
+     * Checks, if an extension is allowed for a file type.
+     * 
+     * @param type
+     * @param extension
+     * @return True, false.
+     */
+    public static boolean isAllowed(final String type, final String extension) {
+	String ext = extension.toLowerCase();
+	Set allowed = (Set) extensionsAllowed.get(type);
+	Set denied = (Set) extensionsDenied.get(type);
+	if (allowed.isEmpty())
+	    return (denied.contains(ext)) ? false : true;
+	if (denied.isEmpty())
+	    return (allowed.contains(ext)) ? true : false;
+	return false;
+    }
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/FCKeditor.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/FCKeditor.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/FCKeditor.java	(revision 1312)
@@ -0,0 +1,320 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+package com.fredck.fckeditor;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.fredck.fckeditor.tool.Compatibility;
+
+/**
+ * FCKeditor control class.<br>
+ * It's the container for all properties and the class that generate the output based on browser capabilities and
+ * configurations passed by the developer.
+ * 
+ * @version $Id$
+ */
+public class FCKeditor {
+
+    private FCKeditorConfigurations oConfig;
+    private String instanceName;
+    private String value;
+    private String basePath;
+    private String toolbarSet;
+    private String width;
+    private String height;
+
+    private HttpServletRequest request;
+
+    /**
+     * Initialize the object setting all basic configurations.<br>
+     * 
+     * The basePath is context root + {@link ConfigurationHandler#getFckEditorDir()}.
+     * 
+     * @param request
+     *                request object
+     * @param instanceName
+     *                unique name
+     * @param width
+     *                width
+     * @param height
+     *                height
+     * @param toolbarSet
+     *                toolbarSet name
+     * @param value
+     *                initial value
+     */
+    public FCKeditor(final HttpServletRequest request, final String instanceName, final String width,
+	    final String height, final String toolbarSet, final String value) {
+	this.request = request;
+	// TODO muss das mit einem Slash abgeschlossen werden?
+	this.basePath = request.getContextPath() + ConfigurationHandler.getFckEditorDir() + "/";
+	this.instanceName = instanceName;
+
+	// set defaults, if required
+	this.value = (value == null) ? "" : value;
+	this.toolbarSet = (toolbarSet == null) ? ConfigurationHandler.getFckEditorToolbarSet() : toolbarSet;
+	this.width = (width == null) ? ConfigurationHandler.getFckEditorWidth() : width;
+	this.height = (height == null) ? ConfigurationHandler.getFckEditorHeight() : height;
+
+	oConfig = new FCKeditorConfigurations();
+    }
+
+    /**
+     * Just a wrapper to {@link FCKeditor}.
+     * 
+     * @param req
+     *                request object
+     */
+    // TODO Konstruktor würde ich auf deprecated setzten
+    /*
+     * Grund: Laut Server Side Integeratin sollte auf jeden Fall instanceName übergeben
+     */
+    public FCKeditor(HttpServletRequest req) {
+	this(req, null, null, null, null, null);
+    }
+
+    /**
+     * Just a wrapper to {@link FCKeditor}.
+     * 
+     * @param req
+     *                request object
+     * @param parInstanceName
+     *                unique name
+     */
+    public FCKeditor(HttpServletRequest req, String parInstanceName) {
+	this(req, parInstanceName, null, null, null, null);
+    }
+
+    /**
+     * Get the unique name of the editor
+     * 
+     * @return name
+     */
+    public String getInstanceName() {
+	return instanceName;
+    }
+
+    /**
+     * Set the unique name of the editor
+     * 
+     * @param value
+     *                name
+     */
+    public void setInstanceName(String value) {
+	instanceName = value;
+    }
+
+    /**
+     * Get the initial value to be edited.<br>
+     * In HTML code
+     * 
+     * @return value
+     */
+    public String getValue() {
+	return value;
+    }
+
+    /**
+     * Set the initial value to be edited.<br>
+     * In HTML code
+     * 
+     * @param value
+     *                value
+     */
+    public void setValue(String value) {
+	this.value = value;
+    }
+
+    /**
+     * Get the dir where the FCKeditor files reside on the server
+     * 
+     * @return path
+     */
+    public String getBasePath() {
+	return basePath;
+    }
+
+    /**
+     * Set the dir where the FCKeditor files reside on the server.<br>
+     * <b>Remarks</b>:<br>
+     * Avoid using relative paths. It is preferable to set the base path starting from the root (/).<br>
+     * Always finish the path with a slash (/).
+     * 
+     * @param value
+     *                path
+     */
+    public void setBasePath(String value) {
+	basePath = value;
+    }
+
+    /**
+     * Get the name of the toolbar to display
+     * 
+     * @return toolbar name
+     */
+    public String getToolbarSet() {
+	return toolbarSet;
+    }
+
+    /**
+     * Set the name of the toolbar to display
+     * 
+     * @param value
+     *                toolbar name
+     */
+    public void setToolbarSet(String value) {
+	toolbarSet = value;
+    }
+
+    /**
+     * Get the width of the textarea
+     * 
+     * @return width
+     */
+    public String getWidth() {
+	return width;
+    }
+
+    /**
+     * Set the width of the textarea
+     * 
+     * @param value
+     *                width
+     */
+    public void setWidth(String value) {
+	width = value;
+    }
+
+    /**
+     * Get the height of the textarea
+     * 
+     * @return height
+     */
+    public String getHeight() {
+	return height;
+    }
+
+    /**
+     * Set the height of the textarea
+     * 
+     * @param value
+     *                height
+     */
+    public void setHeight(String value) {
+	height = value;
+    }
+
+    /**
+     * Get the advanced configuation set.<br>
+     * Adding element to this collection you can override the settings specified in the config.js file.
+     * 
+     * @return configuration collection
+     */
+    public FCKeditorConfigurations getConfig() {
+	return oConfig;
+    }
+
+    /**
+     * Set the advanced configuation set.
+     * 
+     * @param value
+     *                configuration collection
+     */
+    public void setConfig(FCKeditorConfigurations value) {
+	oConfig = value;
+    }
+
+    // TODO Methoden fangen mit Kleinbuchstaben an
+    private String HTMLEncode(String txt) {
+	txt = txt.replaceAll("&", "&amp;");
+	txt = txt.replaceAll("<", "&lt;");
+	txt = txt.replaceAll(">", "&gt;");
+	txt = txt.replaceAll("\"", "&quot;");
+	txt = txt.replaceAll("'", "&#146;");
+	return txt;
+    }
+
+    /**
+     * Generate the HTML Code for the editor. <br>
+     * Evalute the browser capabilities and generate the editor if compatible, or a simple textarea otherwise.
+     * 
+     * @return html code
+     */
+    public String create() {
+    	// TODO Eventuell StringBuilder, da der schneller ist
+    	// Wie sind dann aber in Multiuser env
+    	StringBuffer strEditor = new StringBuffer();
+
+	strEditor.append("<div>");
+	String encodedValue = HTMLEncode(value);
+
+	if (Compatibility.check(request.getHeader("user-agent"))) {
+
+		 // TODO Variablen separat hinzufügen
+		strEditor.append("<input type=\"hidden\" id=\"" + instanceName + "\" name=\"" + instanceName
+		    + "\" value=\"" + encodedValue + "\">");
+
+	    strEditor.append(createConfigHTML());
+	    strEditor.append(createIFrameHTML());
+
+	} else {
+	    // TODO s.o.
+		// TODO lowercase HTML tags nutzen
+		strEditor.append("<TEXTAREA name=\"" + instanceName + "\" rows=\"4\" cols=\"40\" style=\"WIDTH: " + width
+		    + "; HEIGHT: " + height + "\" wrap=\"virtual\">" + encodedValue + "</TEXTAREA>");
+	}
+	strEditor.append("</div>");
+	return strEditor.toString();
+    }
+
+    private String createConfigHTML() {
+	String configStr = oConfig.getUrlParams();
+	if (!configStr.equals(""))
+	    configStr = configStr.substring(1);
+
+	return "<input type=\"hidden\" id=\"" + instanceName + "___Config\" value=\"" + configStr + "\">";
+    }
+
+    private String createIFrameHTML() {
+	// TODO eventuell mit neuer Pfadstruktur untersuchen
+    	String sLink = basePath + "editor/fckeditor.html?InstanceName=" + instanceName;
+
+	if (!toolbarSet.equals(""))
+	    sLink += "&Toolbar=" + toolbarSet;
+
+	 // TODO Variablen separat hinzufügen
+	return "<iframe id=\"" + instanceName + "___Frame\" src=\"" + sLink + "\" width=\"" + width + "\" height=\""
+		+ height + "\" frameborder=\"no\" scrolling=\"no\"></iframe>";
+    }
+    
+    /**
+     * Checks the compatibility of the browser of the current request.
+     * 
+     * @return True, if compatible or false.
+     * @see {@link Compatibility#check(String)}
+     */
+    public boolean isCompatibleBrowser() {
+	if (request != null)
+	    return Compatibility.check(request.getHeader("user-agent"));
+	return false;
+    }
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/FCKeditorConfigurations.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/FCKeditorConfigurations.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/FCKeditorConfigurations.java	(revision 1312)
@@ -0,0 +1,79 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+package com.fredck.fckeditor;
+
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Contains the configuration settings for the FCKEditor.<br>
+ * Adding element to this collection you can override the settings specified in
+ * the config.js file.
+ * 
+ * @version $Id$
+ */
+public class FCKeditorConfigurations extends HashMap {
+
+    /**
+     * Initialize the configuration collection
+     */
+    public FCKeditorConfigurations() {
+	super();
+    }
+
+    /**
+     * Generate the url parameter sequence used to pass this configuration to
+     * the editor.
+     * 
+     * @return html endocode sequence of configuration parameters
+     */
+    public String getUrlParams() {
+	StringBuffer osParams = new StringBuffer();
+
+	for (Iterator i = this.entrySet().iterator(); i.hasNext();) {
+	    Map.Entry entry = (Map.Entry) i.next();
+	    if (entry.getValue() != null) {
+		osParams.append("&");
+		osParams.append(encodeConfig(entry.getKey().toString()));
+		osParams.append("=");
+		osParams.append(encodeConfig(entry.getValue().toString()));
+	    }
+	}
+	return osParams.toString();
+    }
+
+    /**
+     * @see URLEncoder#encode(String, String)
+     * @param txt
+     * @return
+     */
+    @Deprecated
+    private String encodeConfig(String txt) {
+	txt = txt.replaceAll("&", "%26");
+	txt = txt.replaceAll("=", "%3D");
+	txt = txt.replaceAll("\"", "%22");
+	return txt;
+    }
+
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/IBaseDirProvider.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/IBaseDirProvider.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/IBaseDirProvider.java	(revision 1312)
@@ -0,0 +1,37 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package com.fredck.fckeditor;
+
+/**
+ * This interface has to be implemented by the class, which provides the user
+ * dir. <br>
+ * E.g. this class could set construct the user depended on a session.
+ * 
+ * @version $Id:IBaseDirProvider.java 1099 2007-11-06 15:01:50Z th-schwarz $
+ */
+public interface IBaseDirProvider {
+
+    /**
+     * @return Base dir for user files. It's relative to the context root (no
+     *         leading or ending /).
+     */
+    public String getDir();
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 1312)
@@ -0,0 +1,313 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package com.fredck.fckeditor.connector;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.filefilter.DirectoryFileFilter;
+import org.apache.commons.io.filefilter.FileFileFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import com.fredck.fckeditor.ConfigurationHandler;
+import com.fredck.fckeditor.tool.Utils;
+
+/**
+ * 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>
+ * 
+ * @version $Id$
+ */
+public class ConnectorServlet extends HttpServlet {
+
+    private static final long serialVersionUID = -5742008970929377161L;
+    private final Logger logger = LoggerFactory.getLogger(ConnectorServlet.class); 
+
+    
+    /**
+     * Initialize the servlet.<br>
+     * Retrieve from the servlet configuration the "baseDir" which is the root of the file repository.
+     */
+    public void init() throws ServletException {
+	if (getInitParameter("baseDir") != null)
+	    ConfigurationHandler.setBaseDir(getInitParameter("baseDir"));
+	String realBaseDir = getServletContext().getRealPath(ConfigurationHandler.getBaseDir());
+	File baseFile = new File(realBaseDir);
+	if (!baseFile.exists()) {
+	    baseFile.mkdirs();
+	}
+	logger.info("*** Connector Servlet initialized!");
+    }
+
+    /**
+     * 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 {
+	logger.debug("Entered #doGet.");
+	
+	response.setCharacterEncoding("UTF-8");
+	response.setContentType("application/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");
+
+	// TODO untersuchen wie es vom Res Browser kommt
+	String currentPath = ConfigurationHandler.getBaseDir() + "/" + typeStr + currentFolderStr;
+	currentPath = Utils.replaceAll(currentPath, "//", "/");
+	String currentDirPath = getServletContext().getRealPath(currentPath);
+
+	File currentDir = new File(currentDirPath);
+	if (!currentDir.exists()) {
+	    currentDir.mkdir();
+	}
+
+	Document document = null;
+	try {
+	    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+	    DocumentBuilder builder = factory.newDocumentBuilder();
+	    document = builder.newDocument();
+	} catch (ParserConfigurationException pce) {
+	    logger.error("Error while parsing DOM: " + pce.getLocalizedMessage(), pce);
+	}
+
+	Node root = CreateCommonXml(document, commandStr, typeStr, currentFolderStr, request.getContextPath()
+		+ currentPath);
+	logger.debug("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) {
+	    logger.error("Error while transforming DOM to HttpServletResponse: " + ex.getMessage(), ex);
+	}
+
+	out.flush();
+	out.close();
+	logger.debug("Successfull ended #doGet!");
+    }
+
+    /**
+     * 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 {
+	logger.debug("Entered #doPost.");
+
+	response.setCharacterEncoding("UTF-8");
+	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 = ConfigurationHandler.getBaseDir() + "/" + typeStr + currentFolderStr;
+	currentPath = Utils.replaceAll(currentPath, "//", "/");
+	String currentDirPath = getServletContext().getRealPath(currentPath);
+
+	logger.debug("current path dir: " + currentDirPath);
+	
+	String retVal = "0";
+	String newName = "";
+
+	if (!commandStr.equals("FileUpload"))
+	    retVal = "203";
+	else {
+	    FileItemFactory factory = new DiskFileItemFactory();
+	    ServletFileUpload upload = new ServletFileUpload(factory);
+	    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 baseName = FilenameUtils.getBaseName(filename);// Utils.getNameWithoutExtension(filename);
+		String ext = FilenameUtils.getExtension(filename); // Utils.getExtension(fileName);
+		File pathToSave = new File(currentDirPath, filename);
+		int counter = 1;
+		while (pathToSave.exists()) {
+		    newName = baseName + "(" + counter + ")" + "." + ext;
+		    retVal = "201";
+		    pathToSave = new File(currentDirPath, 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();
+	
+	logger.debug("Successfull ended #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((FileFilter) DirectoryFileFilter.DIRECTORY);
+	for (File file : fileList) {
+	    Element myEl = doc.createElement("Folder");
+	    myEl.setAttribute("name", file.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((FileFilter) FileFileFilter.FILE);
+
+	for (File file : fileList) {
+	    Element myEl = doc.createElement("File");
+	    myEl.setAttribute("name", file.getName());
+	    myEl.setAttribute("size", String.valueOf(file.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;
+    }
+
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/package.html
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/package.html	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/package.html	(revision 1312)
@@ -0,0 +1,74 @@
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * JavaDoc connector documentation.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+Connector used by the FCKeditor to list and create resources on the server.
+
+<h2>Package Specification</h2>
+
+This servlet is access directly from the file browser in the FCKeditor.<br>
+To make everything work correctly you have to add the following piece of code in your application's web.xml
+<br>
+<pre>
+	&lt;servlet&gt;
+		&lt;servlet-name&gt;Connector&lt;/servlet-name&gt;
+		&lt;servlet-class&gt;com.fredck.FCKeditor.connector.ConnectorServlet&lt;/servlet-class&gt;
+		&lt;init-param&gt;
+			&lt;param-name&gt;baseDir&lt;/param-name&gt;
+			&lt;param-value&gt;/UserFiles/&lt;/param-value&gt;
+		&lt;/init-param&gt;
+		&lt;init-param&gt;
+			&lt;param-name&gt;debug&lt;/param-name&gt;
+			&lt;param-value&gt;false&lt;/param-value&gt;
+		&lt;/init-param&gt;
+		&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
+	&lt;/servlet&gt;
+
+	&lt;servlet-mapping&gt;
+		&lt;servlet-name&gt;Connector&lt;/servlet-name&gt;
+		&lt;url-pattern&gt;/editor/filemanager/browser/default/connectors/jsp/connector&lt;/url-pattern&gt;
+	&lt;/servlet-mapping&gt;
+</pre>
+<br>
+And put in the fckconfig.js the following line:
+<pre>
+FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" ;
+FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" ;
+FCKConfig.FlashBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector" ;
+</pre>
+Also, since the servlet manage a file upload using the Jakarta Common fileupload library, you need to put in your <code>WEB-INF/lib/</code> the <code>commons-fileupload.jar</code>.
+<h2>Related Documentation</h2>
+
+For overviews, tutorials, examples, guides, and tool documentation, please see:
+<ul>
+  <li>_sample/jsp directory for example of how to implement FCKeditor in your application
+</ul>
+
+<!-- Put @see and @since tags down here. -->
+
+</body>
+</html>
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/package.html
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/package.html	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/package.html	(revision 1312)
@@ -0,0 +1,43 @@
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * JavaDoc package documentation.
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+Core objects to manage the FCKeditor text input form.
+Java Integration Module 2.4.
+
+<h2>Related Documentation</h2>
+
+For overviews, tutorials, examples, guides, and tool documentation, please see:
+<ul>
+  <li><a href="http://www.fckeditor.net/">Official web site of FCKeditor</a>
+</ul>
+
+<!-- Put @see and @since tags down here. -->
+
+</body>
+</html>
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tags/FCKeditorTag.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tags/FCKeditorTag.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tags/FCKeditorTag.java	(revision 1312)
@@ -0,0 +1,692 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+ 
+package com.fredck.fckeditor.tags;
+
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.BodyContent;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+
+import com.fredck.fckeditor.FCKeditor;
+
+/**
+ * FCKeditor Tag class to access the {@linkplain com.fredck.FCKeditor.FCKeditor container}.<br>
+ *<p>
+ * <b>Simple usage</b>:
+ * <pre>
+ *	&lt;FCK:editor
+ *		id="EditorAccessibility"
+ *		width="80%"
+ *		height="120"
+ *		toolbarSet="Accessibility"
+ *	"&gt;This is another test. &lt;BR&gt;&lt;BR&gt;The "Second" row.&lt;/BR&gt;&lt;/FCK:editor"&gt;
+ * </pre>
+ *
+ *<p>In this example we set all the attribute for the fckedit tag.
+ *
+ *<p>
+ *  <b>Advanced usage of the tag</b>:
+ *  <pre>
+ *	&lt;FCK:editor id="EditorDefault" basePath="/FCKeditor/"
+ *		styleNames=";Style 1;Style 2; Style 3" 
+ *		fontNames=";Arial;Courier New;Times New Roman;Verdana" &gt;
+ *		This is some &lt;B&gt;sample text&lt;/B&gt;.
+ *	&lt;/FCK:editor&gt;
+ *  </pre>
+ * In this example we set the id and the basePath of the editor (since it is /FCKeditor/
+ * we could have omitted it because it's already the default value).<br>
+ * Then we used the the optional attributes to set some advanced configuration settings.
+ */
+public class FCKeditorTag extends BodyTagSupport  {
+	
+	private static final long serialVersionUID = -173091731589866140L;
+	private String id;
+	private String value = "";
+	private String basePath = null;
+	private String toolbarSet = null;
+	private String width = null;
+	private String height = null;
+	private String customConfigurationsPath = null;
+	private String editorAreaCSS = null;
+	private String baseHref = null;
+	private String skinPath = null;
+	private String pluginsPath = null;
+	private String fullPage = null;
+	private String debug = null;	
+	private String autoDetectLanguage = null;
+	private String defaultLanguage = null;
+	private String contentLangDirection = null;
+	private String enableXHTML = null;
+	private String enableSourceXHTML = null;
+	private String fillEmptyBlocks = null;
+	private String formatSource = null;
+	private String formatOutput = null;
+	private String formatIndentator = null;
+	private String geckoUseSPAN = null;
+	private String startupFocus = null;
+	private String forcePasteAsPlainText = null;
+	private String forceSimpleAmpersand = null;
+	private String tabSpaces = null;
+	private String useBROnCarriageReturn = null;
+	private String toolbarStartExpanded = null;
+	private String toolbarCanCollapse = null;
+	private String fontColors = null;
+	private String fontNames = null;
+	private String fontSizes = null;
+	private String fontFormats = null;
+	private String stylesXmlPath = null;
+	private String linkBrowserURL = null;
+	private String imageBrowserURL = null;
+	private String flashBrowserURL = null;
+	private String linkUploadURL = null;
+	private String imageUploadURL = null;
+	private String flashUploadURL = null;
+	
+
+
+
+   /**
+     * The underlying FCKeditor object
+     *
+     */		
+	protected FCKeditor fcked = null;
+
+
+    /**
+     * Set the unique id of the editor
+     *
+     * @param value name
+     */	
+	public void setId(String value) {
+		id=value;
+	}
+
+    /**
+     * Set the dir where the FCKeditor files reside on the server
+     *
+     * @param value path
+     */		
+	public void setBasePath(String value) {
+		basePath=value;
+	}
+
+    /**
+     * Set the name of the toolbar to display
+     *
+     * @param value toolbar name
+     */		
+	public void setToolbarSet(String value) {
+		toolbarSet=value;
+	}
+
+    /**
+     * Set the width of the textarea
+     *
+     * @param value width
+     */		
+	public void setWidth(String value) {
+		width=value;
+	}
+
+    /**
+     * Set the height of the textarea
+     *
+     * @param value height
+     */		
+	public void setHeight(String value) {
+		height=value;
+	}
+
+	/**
+	 * Set the path of a custom file that can override some configurations.<br>
+	 * It is recommended to use absolute paths (starting with /), like "/myfckconfig.js".
+	 *
+	 * @param value path
+	 */
+	public void setCustomConfigurationsPath(String value) {
+		customConfigurationsPath=value;
+	}
+	
+
+	/**
+	 * Set the CSS styles file to be used in the editing area.<br>
+	 * In this way you can point to a file that reflects your web site styles.
+	 *
+	 * @param value path
+	 */
+	public void setEditorAreaCSS(String value) {
+		editorAreaCSS=value;
+	}
+	
+
+	/**
+	 * Base URL used to resolve links (on images, links, styles, etc.).<br>
+	 * For example, if BaseHref is set to 'http://www.fredck.com', an image that points to "/images/Logo.gif" will be interpreted by the editor as "http://www.fredck.com/images/Logo.gif", without touching the "src" attribute of the image.
+	 *
+	 * @param value URL
+	 */
+	public void setBaseHref(String value) {
+		baseHref=value;
+	}
+	
+	
+	/**
+	 * Sets the path to the skin (graphical interface settings) to be used by the editor.
+	 *
+	 * @param value path
+	 */
+	public void setSkinPath(String value) {
+		skinPath=value;
+	}
+	
+	
+	/**
+	 * Sets the base path used when looking for registered plugins.
+	 *
+	 * @param value path
+	 */
+	public void setPluginsPath(String value) {
+		pluginsPath=value;
+	}
+	
+	
+	/**
+	 * Enables full page editing (from &lt;HTML&gt; to &lt;/HTML&gt;).<br>
+	 * It also enables the "Page Properties" toolbar button.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setFullPage(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("fullPage attribute can only be true or false");
+		fullPage=value;
+	}
+	
+	
+	/**
+	 * Enables the debug window to be shown when calling the FCKDebug.Output() function.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setDebug(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("debug attribute can only be true or false");
+		debug=value;
+	}
+	
+	
+	/**
+	 * Tells the editor to automatically detect the user language preferences to adapt its interface language.<br>
+	 * With Internet Explorer, the language configured in the Windows Control Panel is used.<br>
+	 * With Firefox, the browser language is used.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setAutoDetectLanguage(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("autoDetectLanguage attribute can only be true or false: here was " + value);
+		autoDetectLanguage=value;
+	}
+	
+	
+	/**
+	 * Sets the default language used for the editor's interface localization.<br>
+	 * The default language is used when the AutoDetectLanguage options is disabled or when the user language is not available.
+	 *
+	 * @param value language code
+	 */
+	public void setDefaultLanguage(String value) {
+		defaultLanguage=value;
+	}
+	
+	
+	/**
+	 * Sets the direction of the editor area contents.<br>
+	 * The possible values are:
+	 * <ul>
+     * <li>ltr - Left to Right
+     * <li>rtl - Right to Left
+     * </ul>
+	 *
+	 * @param value ltr/rtl
+	 * @throws JspException if value is not ltr or rtl
+	 */
+	public void setContentLangDirection(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("debug attribute can only be ltr or rtl");
+		contentLangDirection=value;
+	}
+	
+	
+	/**
+	 * Tells the editor to process the HTML source to XHTML on form post.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setEnableXHTML(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("enableXHTML attribute can only be true or false");
+		enableXHTML=value;
+	}
+	
+	
+	/**
+	 * Tells the editor to process the HTML source to XHTML when switching from WYSIWYG to Source view
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setEnableSourceXHTML(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("enableSourceXHTML attribute can only be true or false");
+		enableSourceXHTML=value;
+	}
+	
+	
+	/**
+	 * Block elements (like P, DIV, H1, PRE, etc...) are forced to have content (a &amp;nbsp;).<br>
+	 * Empty blocks are "collapsed" by while browsing, so a empty &lt;p&gt;&lt;/p&gt; is not visible.<br>
+	 * While editing, the editor "expand" empty blocks so you can insert content inside then.<br>
+	 * Setting this option to "true" results useful to reflect the same output when browsing and editing.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setFillEmptyBlocks(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("fillEmptyBlocks attribute can only be true or false");
+		fillEmptyBlocks=value;
+	}
+	
+	
+	/**
+	 * The HTML shown by the editor, while switching from WYSIWYG to Source views, will be processed and formatted
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setFormatSource(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("formatSource attribute can only be true or false");
+		formatSource=value;
+	}
+	
+	
+	/**
+	 * The output HTML generated by the editor will be processed and formatted.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setFormatOutput(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("formatOutput attribute can only be true or false");
+		formatOutput=value;
+	}
+	
+	/**
+	 * Sets the characters to be used when indenting the HTML source when formatting it.<BR>
+	 * Useful values are a sequence of spaces ('     ') or a tab char ('\t').
+	 *
+	 * @param value indentator
+	 */
+	public void setFormatIndentator(String value) {
+		formatIndentator=value;
+	}
+	
+	
+	/**
+	 * Tells Gecko browsers to use SPAN instead of &lt;B&gt;, &lt;I&gt; and &lt;U&gt; for bold, italic an underline
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setGeckoUseSPAN(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("GeckoUseSPAN attribute can only be true or false");
+		geckoUseSPAN=value;
+	}
+	
+	
+	/**
+	 * Forces the editor to get the keyboard input focus on startup (page load)
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setStartupFocus(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("startupFocus attribute can only be true or false");
+		startupFocus=value;
+	}
+	
+	
+	/**
+	 * Converts the clipboard contents to pure text on pasting operations
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setForcePasteAsPlainText(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("forcePasteAsPlainText attribute can only be true or false");
+		forcePasteAsPlainText=value;
+	}
+	
+	
+	/**
+	 * Forces the ampersands (&) on tags attributes to not be converted to "&amp;amp;"<BR>
+	 * This conversion is a W3C requirement for XHTML, so it is recommended to leave this option to "false".
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setForceSimpleAmpersand(String value) throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("forceSimpleAmpersand attribute can only be true or false");
+		forceSimpleAmpersand=value;
+	}
+	
+	
+	/**
+	 * Set the number of spaces (&amp;nbsp;) to be inserted when the user hits the "tab" key.<BR>
+	 * This is an Internet Explorer only feature. Other browsers insert spaces automatically by default.
+	 *
+	 * @param value number of spaces
+	 */
+	public void setTabSpaces(String value) {
+		tabSpaces=value;
+	}
+	
+	
+	/**
+	 * Inserts a &lt;BR&gt; tag when the user hits the "enter" key, instead of starting a new paragraph (&lt;P&gt; or &lt;DIV&gt;).<BR>
+	 * This is an Internet Explorer only feature. Other browsers insert the &lt;BR&gt; tag by default.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setUseBROnCarriageReturn(String value)  throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("useBROnCarriageReturn attribute can only be true or false");
+		useBROnCarriageReturn=value;
+	}
+	
+	
+	/**
+	 * The toolbar is Expanded on startup, otherwise it is Collapsed and the user must click on it to show it.
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setToolbarStartExpanded(String value)   throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("ToolbarStartExpanded attribute can only be true or false");
+		toolbarStartExpanded=value;
+	}
+	
+	
+	/**
+	 * Tells the editor that the toolbar can be Collapsed/Expanded by the user when clicking the vertical bar placed on the left of it (on the right for "rtl" languages).
+	 *
+	 * @param value true/false
+	 * @throws JspException if value is not true or false
+	 */
+	public void setToolbarCanCollapse(String value)    throws JspException {
+		if(! value.equals("true") && ! value.equals("false"))
+			throw new JspException("ToolbarCanCollapse attribute can only be true or false");
+		toolbarCanCollapse=value;
+	}
+	
+	
+	/**
+	 * Sets the colors that must be shown in the colors panels (in the toolbar).
+	 *
+	 * @param value colors
+	 */
+	public void setFontColors(String value) {
+		fontColors=value;
+	}
+	
+	
+	/**
+	 * Sets the list of fonts to be shown in the "Font" toolbar command.
+	 *
+	 * @param value fonts
+	 */
+	public void setFontNames(String value) {
+		fontNames=value;
+	}
+	
+	
+	/**
+	 * Sets the list of font sizes to be shown in the "Size" toolbar command.
+	 *
+	 * @param value sizes
+	 */
+	public void setFontSizes(String value) {
+		fontSizes=value;
+	}
+	
+	
+	/**
+	 * Sets the list of formats to be shown in the "Format" toolbar command.
+	 *
+	 * @param value format list
+	 */
+	public void setFontFormats(String value) {
+		fontFormats=value;
+	}
+	
+	
+	/**
+	 * Sets the path to the XML file that has the definitions and rules of the styles used by the "Style" toolbar command
+	 *
+	 * @param value path
+	 */
+	public void setStylesXmlPath(String value) {
+		stylesXmlPath=value;
+	}
+	
+	
+	/**
+	 * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Link" dialog window.<BR>
+	 * In this way, you can create your custom File Browser that is well integrated with your system.
+	 *
+	 * @param value path
+	 */
+	public void setLinkBrowserURL(String value) {
+		linkBrowserURL=value;
+	}
+	
+	
+	/**
+	 * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Image" dialog window.<BR>
+	 * In this way, you can create your custom Image Browser that is well integrated with your system.
+	 *
+	 * @param value path
+	 */
+	public void setImageBrowserURL(String value) {
+		imageBrowserURL=value;
+	}
+
+	/**
+	 * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Flash" dialog window.<BR>
+	 * In this way, you can create your custom Flash Browser that is well integrated with your system.
+	 *
+	 * @param value path
+	 */
+	public void setFlashBrowserURL(String value) {
+		flashBrowserURL=value;
+	}
+
+
+	/**
+	 * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Link" dialog window.<BR>
+	 * In this way, you can create your custom Link Uploader that is well integrated with your system.
+	 *
+	 * @param value path
+	 */
+	public void setLinkUploadURL(String value) {
+		linkUploadURL=value;
+	}
+
+
+	/**
+	 * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Image" dialog window.<BR>
+	 * In this way, you can create your custom Image Uploader that is well integrated with your system.
+	 *
+	 * @param value path
+	 */
+	public void setImageUploadURL(String value) {
+		imageUploadURL=value;
+	}
+
+
+	/**
+	 * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Flash" dialog window.<BR>
+	 * In this way, you can create your custom Flash Uploader that is well integrated with your system.
+	 *
+	 * @param value path
+	 */
+	public void setFlashUploadURL(String value) {
+		flashUploadURL=value;
+	}		
+
+
+	/**
+	 * Initialize the FCKeditor container and set attributes
+	 *
+	 * @return EVAL_BODY_BUFFERED
+	 */
+	public int doStartTag() throws JspException {
+		fcked=new FCKeditor((HttpServletRequest)pageContext.getRequest(),id);
+		if(toolbarSet!=null)
+			fcked.setToolbarSet(toolbarSet);
+		if(basePath!=null)
+			fcked.setBasePath(basePath);
+		if(width!=null)
+			fcked.setWidth(width);
+		if(height!=null)
+			fcked.setHeight(height);
+		if (customConfigurationsPath != null)
+			fcked.getConfig().put("CustomConfigurationsPath",customConfigurationsPath);
+		if (editorAreaCSS != null)
+			fcked.getConfig().put("EditorAreaCSS",editorAreaCSS);
+		if (baseHref != null)
+			fcked.getConfig().put("BaseHref",baseHref);
+		if (skinPath != null)
+			fcked.getConfig().put("SkinPath",skinPath);
+		if (pluginsPath != null)
+			fcked.getConfig().put("PluginsPath",pluginsPath);	
+		if (fullPage != null)
+			fcked.getConfig().put("FullPage",fullPage);
+		if (debug != null)
+			fcked.getConfig().put("Debug",debug);
+		if (autoDetectLanguage != null)
+			fcked.getConfig().put("AutoDetectLanguage",autoDetectLanguage);
+		if (defaultLanguage != null)
+			fcked.getConfig().put("DefaultLanguage",defaultLanguage);
+		if (contentLangDirection != null)
+			fcked.getConfig().put("ContentLangDirection",contentLangDirection);
+		if (enableXHTML != null)
+			fcked.getConfig().put("EnableXHTML",enableXHTML);
+		if (enableSourceXHTML != null)
+			fcked.getConfig().put("EnableSourceXHTML",enableSourceXHTML);
+		if (fillEmptyBlocks != null)
+			fcked.getConfig().put("FillEmptyBlocks",fillEmptyBlocks);
+		if (formatSource != null)
+			fcked.getConfig().put("FormatSource",formatSource);
+		if (formatOutput != null)
+			fcked.getConfig().put("FormatOutput",formatOutput);
+		if (formatIndentator != null)
+			fcked.getConfig().put("FormatIndentator",formatIndentator);
+		if (geckoUseSPAN != null)
+			fcked.getConfig().put("GeckoUseSPAN",geckoUseSPAN);
+		if (startupFocus != null)
+			fcked.getConfig().put("StartupFocus",startupFocus);
+		if (forcePasteAsPlainText != null)
+			fcked.getConfig().put("ForcePasteAsPlainText",forcePasteAsPlainText);
+		if (forceSimpleAmpersand != null)
+			fcked.getConfig().put("ForceSimpleAmpersand",forceSimpleAmpersand);
+		if (tabSpaces != null)
+			fcked.getConfig().put("TabSpaces",tabSpaces);
+		if (useBROnCarriageReturn != null)
+			fcked.getConfig().put("UseBROnCarriageReturn",useBROnCarriageReturn);
+		if (toolbarStartExpanded != null)
+			fcked.getConfig().put("ToolbarStartExpanded",toolbarStartExpanded);
+		if (toolbarCanCollapse != null)
+			fcked.getConfig().put("ToolbarCanCollapse",toolbarCanCollapse);
+		if (fontColors != null)
+			fcked.getConfig().put("FontColors",fontColors);
+		if (fontNames != null)
+			fcked.getConfig().put("FontNames",fontNames);
+		if (fontSizes != null)
+			fcked.getConfig().put("FontSizes",fontSizes);
+		if (fontFormats != null)
+			fcked.getConfig().put("FontFormats",fontFormats);
+		if (stylesXmlPath != null)
+			fcked.getConfig().put("StylesXmlPath",stylesXmlPath);
+		if (linkBrowserURL != null)
+			fcked.getConfig().put("LinkBrowserURL",linkBrowserURL);
+		if (imageBrowserURL != null)
+			fcked.getConfig().put("ImageBrowserURL",imageBrowserURL);
+		if (flashBrowserURL != null)
+			fcked.getConfig().put("FlashBrowserURL",flashBrowserURL);
+		if (linkUploadURL != null)
+			fcked.getConfig().put("LinkUploadURL",linkUploadURL);
+		if (imageUploadURL != null)
+			fcked.getConfig().put("ImageUploadURL",imageUploadURL);
+		if (flashUploadURL != null)
+			fcked.getConfig().put("FlashUploadURL",flashUploadURL);
+				
+		 return EVAL_BODY_BUFFERED;
+	}
+
+	/**
+	 * Retrive initial value to be edited and writes the HTML code in the page
+	 *
+	 * @return SKIP_BODY
+	 * @throws JspException if an error occurs while writing to the out buffer
+	 */	
+	public int doAfterBody()  throws JspException {
+			BodyContent body = getBodyContent();
+			JspWriter writer = body.getEnclosingWriter();
+			String bodyString = body.getString();
+			fcked.setValue(bodyString);
+			try {
+				writer.println(fcked.create());
+			}catch(IOException ioe) {
+				throw new JspException("Error: IOException while writing to the user");
+			}
+			
+			return SKIP_BODY;
+	}
+
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tags/package.html
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tags/package.html	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tags/package.html	(revision 1312)
@@ -0,0 +1,51 @@
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * JavaDoc FCKeditor lib documentation.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+JSP Tag to access and modify the FCKeditor objects.
+
+
+<h2>Package Specification</h2>
+
+This taglibrary is compliant to the taglib 1.1 specification.<br>
+To use it put the FCKeditor.jar inside the <code>WEB-INF/lib</code> dir and FCKeditor.tld inside the <code>WEB-INF</code> directory of your website.<br>
+Put the following declaration in each page that use the tags:<br>
+<pre>
+&lt;%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %&gt;
+</pre>
+
+<h2>Related Documentation</h2>
+
+For overviews, tutorials, examples, guides, and tool documentation, please see:
+<ul>
+  <li>_sample/jsp directory for example of how to implement FCKeditor in your application
+</ul>
+
+<!-- Put @see and @since tags down here. -->
+
+</body>
+</html>
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Compatibility.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 1312)
@@ -0,0 +1,93 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package com.fredck.fckeditor.tool;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Compatibility check.
+ *
+ * @version $Id$
+ */
+public class Compatibility {
+
+    /**
+     * Checks, if a browser's user agent string is compatible for the FCKeditor.
+     * 
+     * @param userAgentString
+     * @return true, if compatible
+     */
+    public static boolean check(final String userAgentString) {
+        if (userAgentString == null || userAgentString.length() < 1)
+            return false;
+    
+        float version;
+    
+        // IE 5.5+, check special keys like 'Opera' and 'mac', because there are some 
+        // other browsers, containing 'MSIE' in there agent string!
+        if (userAgentString.indexOf("Opera") < 0 && userAgentString.indexOf("mac") < 0) {
+            version = getBrowserVersion(userAgentString, ".*MSIE ([\\d]+.[\\d]+).*");
+            if (version != -1f && version >= 5.5f)
+        	return true;
+        }
+    
+        // Gecko
+        version = getBrowserVersion(userAgentString, ".*Gecko/([\\d]+).*");
+        if (version != -1f && version >= 20030210f)
+            return true;
+    
+        // Opera 9.5+
+        version = getBrowserVersion(userAgentString, "Opera/([\\d]+.[\\d]+).*");
+        if (version != -1f && version >= 9.5f)
+            return true;
+    
+        // Safari 3+
+        version = getBrowserVersion(userAgentString, ".*AppleWebKit/([\\d]+).*");
+        if (version != -1f && version >= 522f)
+            return true;
+    
+        return false;
+    }
+
+    /**
+     * Helper method to get the the browser version from 'userAgent' with the
+     * regular expression 'regex'. The first group of the matches has to be the
+     * version number!
+     * 
+     * @param userAgent
+     * @param regex
+     * @return The browser version, or -1f
+     */
+    private static float getBrowserVersion(final String userAgent,
+            final String regex) {
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(userAgent);
+        if (matcher.matches()) {
+            try {
+        	return Float.parseFloat(matcher.group(1));
+            } catch (NumberFormatException e) {
+            }
+        }
+        return -1f;
+    }
+
+}
Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Utils.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Utils.java	(revision 1312)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Utils.java	(revision 1312)
@@ -0,0 +1,119 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package com.fredck.fckeditor.tool;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+/**
+ * Some static helper methods.
+ * 
+ * @author <a href="mailto:th-schwarz@users.sourceforge.net">Thilo Schwarz</a>
+ */
+public class Utils {
+
+    /**
+     * Constructs a set of uppercased strings from a 'delimiter' separated string.
+     * 
+     * @param stringList
+     * @param delimiter
+     *                The delimiter. It shouldn't be empty!
+     * @return An emtpy list, if 'stringList' is empty, or an uppercased set of strings.
+     * @throws IllegalArgumentException
+     *                 if 'delimiter' is empty.
+     */
+    public static Set getSet(final String stringList, final String delimiter) {
+	if (isEmpty(delimiter))
+	    throw new IllegalArgumentException("Argument 'delimiter' shouldn't be empty!");
+	if (stringList == null || isEmpty(stringList))
+	    return new HashSet();
+
+	Set set = new HashSet();
+	StringTokenizer st = new StringTokenizer(stringList, delimiter);
+	while (st.hasMoreTokens()) {
+	    String tmp = st.nextToken();
+	    if (isNotEmpty(tmp)) // simple empty filter
+		set.add(tmp.toLowerCase());
+	}
+	return set;
+    }
+
+    /**
+     * Just a wrapper to {@link #getSet(String, String)} for using '&#124;' as delimiter.
+     */
+    public static Set getSet(final String stringlist) {
+	return getSet(stringlist, "|");
+    }
+
+    /**
+     * Checks if a string is null or empty.
+     * 
+     * @param str
+     *                to check
+     * @return <code>true</code> if the String is empty or null
+     */
+    public static boolean isEmpty(final String str) {
+	return str == null || str.length() == 0;
+    }
+
+    /**
+     * Just a wrapper to {@link #isEmpty(String)}.
+     * 
+     * @param str
+     * @return <code>true</code> if the String is not empty and not nul
+     */
+    public static boolean isNotEmpty(final String str) {
+	return !isEmpty(str);
+    }
+
+    /**
+     * Replaces all 'search' with 'replacement' in 'string'.
+     * 
+     * <pre>
+     * Utils.replaceAll(null, *, *)		= &quot;&quot;
+     * Utils.replaceAll(&quot;&quot;, *, *)		= &quot;&quot;
+     * Utils.replaceAll(&quot;foo&quot;, null, *)	= &quot;foo&quot;
+     * Utils.replaceAll(&quot;foo&quot;, &quot;o&quot;, &quot;a&quot;)	= &quot;faa&quot;
+     * </pre>
+     * 
+     * @param string
+     * @param search
+     * @param replacement
+     * @return
+     */
+    public static String replaceAll(final String string, final String search, final String replacement) {
+	if (isEmpty(string))
+	    return "";
+	if (isEmpty(search))
+	    return string;
+	if (string.indexOf(search) == -1)
+	    return string;
+	StringBuffer strb = new StringBuffer(string);
+	int pos = strb.indexOf(search);
+
+	while (pos != -1) {
+	    strb.replace(pos, pos + search.length(), replacement);
+	    pos = strb.indexOf(search);
+	}
+	return strb.toString();
+    }
+}
