Index: /FCKeditor.Java/branches/2.4/changelog
===================================================================
--- /FCKeditor.Java/branches/2.4/changelog	(revision 1317)
+++ /FCKeditor.Java/branches/2.4/changelog	(revision 1318)
@@ -9,5 +9,5 @@
 
 features and improvements:
-- safari compatibility
+- safari and opera compatibility
 - all basic properties are managed by a 'ConfigurationHandler' and is used by
   all fckeditor servlets. it has static methods to set these properties from 
@@ -22,4 +22,7 @@
   have the default values. Defaults are the values known from the old web.xml.
 - added FCKeditor#isCompatibleBrowser 
+- deleted obsolete SimpleUploaderServlet
+- introduction of slf4j
+- change base packagename to net.fckeditor
 
 fixes:
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 1317)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ConfigurationHandler.java	(revision 1318)
@@ -21,33 +21,45 @@
 package net.fckeditor;
 
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
- * 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
+ * Static configuration 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 $�
+ * @version $Id:ConfigurationHandler.java 1099 2007-11-06 15:01:50Z th-schwarz $
  */
 public class ConfigurationHandler {
+    private static final Logger logger = LoggerFactory.getLogger(ConfigurationHandler.class);
+
+    private static Properties defaultProperties = new Properties();
     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");
+	try {
+	    defaultProperties.load(new BufferedInputStream(ConfigurationHandler.class.getResourceAsStream("default.properties")));
+	} catch (IOException e) {
+	    logger.error("Error while loading the default properties: " + e.getMessage(), e);
+	    throw new RuntimeException("Can't load default properties, because: "+ e.getMessage(), e);
+	}
+	baseDir = defaultProperties.getProperty("fckeditor.basedir");
+	fckEditorDir = defaultProperties.getProperty("fckeditor.dir");
+	fckEditorWidth = defaultProperties.getProperty("fckeditor.width");
+	fckEditorHeight = defaultProperties.getProperty("fckeditor.height");
+	fckEditorToolbarSet = defaultProperties.getProperty("fckeditor.toolbarset");
+	logger.info("Default properties loaded and initialized successfull.");
     }
 
@@ -155,3 +167,22 @@
 	ConfigurationHandler.fckEditorToolbarSet = fckEditorToolbarSet;
     }
+    
+    /**
+     * Getter for a default property with the name 'key'.
+     * 
+     * @param key
+     * @return The required property or null, if doesn't exists.
+     */
+    public static String getDefaultProperty(final String key) {
+	return defaultProperties.getProperty(key);
+    }
+    
+    /**
+     * Getter for the dafault properties.
+     * 
+     * @return Default properties.
+     */
+    public static Properties getDefaultProperties() {
+	return defaultProperties;
+    }
 }
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 1317)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/Constants.java	(revision 1318)
@@ -28,5 +28,5 @@
 public class Constants {
 	
-    public static final String FILE_TYPE_FILE = "File";
+    public static final String FILE_TYPE_FILE = "File";  // the default
     public static final String FILE_TYPE_IMAGE = "Image";
     public static final String FILE_TYPE_FLASH = "Flash";
Index: Keditor.Java/branches/2.4/src/main/java/net/fckeditor/DefaultPropertiesHolder.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/DefaultPropertiesHolder.java	(revision 1317)
+++ 	(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 net.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 1317)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ExtensionsHandler.java	(revision 1318)
@@ -28,7 +28,6 @@
 
 /**
- * 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.
+ * 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$
@@ -41,28 +40,16 @@
     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")));
+	extensionsAllowed.put(Constants.FILE_TYPE_FILE, 
+		Utils.getSet(ConfigurationHandler.getDefaultProperty("fckeditor.file.extensions.allowed")));
+	extensionsDenied.put(Constants.FILE_TYPE_FILE, 
+		Utils.getSet(ConfigurationHandler.getDefaultProperty("fckeditor.file.extensions.denied")));
+	extensionsAllowed.put(Constants.FILE_TYPE_IMAGE, 
+		Utils.getSet(ConfigurationHandler.getDefaultProperty("fckeditor.image.extensions.allowed")));
+	extensionsDenied.put(Constants.FILE_TYPE_IMAGE, 
+		Utils.getSet(ConfigurationHandler.getDefaultProperty("fckeditor.image.extensions.denied")));
+	extensionsAllowed.put(Constants.FILE_TYPE_FLASH, 
+		Utils.getSet(ConfigurationHandler.getDefaultProperty("fckeditor.flash.extensions.allowed")));
+	extensionsDenied.put(Constants.FILE_TYPE_FLASH, 
+		Utils.getSet(ConfigurationHandler.getDefaultProperty("fckeditor.flash.extensions.denied")));
     }
 
@@ -70,5 +57,6 @@
      * Getter for the allowed extensions of a file type.
      * 
-     * @param type The file type.
+     * @param type
+     *                The file type.
      * @return Set of allowed extensions or an empty set.
      */
@@ -81,12 +69,12 @@
      * If 'extensionsList' is null, allowed extensions kept untouched.
      * 
-     * @param type The file type.
-     * @param extensionsList Required format: <code>ext1&#124;ext2&#124;ext3</code>
+     * @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) {
+    public static void setExtensionsAllowed(final String type, final String extensionsList) {
 	if (extensionsList != null)
-	    ExtensionsHandler.extensionsAllowed.put(type, Utils
-		    .getSet(extensionsList));
+	    ExtensionsHandler.extensionsAllowed.put(type, Utils.getSet(extensionsList));
     }
 
@@ -94,5 +82,6 @@
      * Getter for the denied extensions of a file type.
      * 
-     * @param type The file type.
+     * @param type
+     *                The file type.
      * @return Set of denied extensions or an empty set.
      */
@@ -105,12 +94,12 @@
      * If 'extensionsList' is null, denied extensions kept untouched.
      * 
-     * @param type The file type.
-     * @param extensionsList Required format: <code>ext1&#124;ext2&#124;ext3</code>
+     * @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) {
+    public static void setExtensionsDenied(final String type, final String extensionsList) {
 	if (extensionsList != null)
-	    ExtensionsHandler.extensionsDenied.put(type, Utils
-		    .getSet(extensionsList));
+	    ExtensionsHandler.extensionsDenied.put(type, Utils.getSet(extensionsList));
     }
 
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 1317)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 1318)
@@ -25,4 +25,5 @@
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -90,5 +91,5 @@
 	    baseFile.mkdirs();
 	}
-	logger.info("*** Connector Servlet initialized!");
+	logger.info("*** Connector Servlet initialized successfull!");
     }
 
@@ -115,6 +116,5 @@
 
 	// TODO untersuchen wie es vom Res Browser kommt
-	String currentPath = ConfigurationHandler.getBaseDir() + "/" + typeStr + currentFolderStr;
-	currentPath = Utils.replaceAll(currentPath, "//", "/");
+	String currentPath = constructTypeBasedFolderString(typeStr, currentFolderStr);
 	String currentDirPath = getServletContext().getRealPath(currentPath);
 
@@ -122,4 +122,5 @@
 	if (!currentDir.exists()) {
 	    currentDir.mkdir();
+	    logger.debug("Dir successfull created: " + currentDirPath);
 	}
 
@@ -208,8 +209,6 @@
 	String currentFolderStr = request.getParameter("CurrentFolder");
 
-	String currentPath = ConfigurationHandler.getBaseDir() + "/" + typeStr + currentFolderStr;
-	currentPath = Utils.replaceAll(currentPath, "//", "/");
+	String currentPath = constructTypeBasedFolderString(typeStr, currentFolderStr);
 	String currentDirPath = getServletContext().getRealPath(currentPath);
-
 	logger.debug("current path dir: " + currentDirPath);
 	
@@ -311,3 +310,11 @@
     }
 
+    // TODO move to ConfigurationHandler?
+    private String constructTypeBasedFolderString(final String fileType, final String currentFolderString) {
+	StringWriter retval = new StringWriter();
+	retval.append(ConfigurationHandler.getBaseDir()).append('/');
+	retval.append(fileType.toLowerCase());
+	retval.append(currentFolderString);
+	return Utils.replaceAll(retval.toString(), "//", "/");
+    }
 }
Index: /FCKeditor.Java/branches/2.4/src/main/resources/net/fckeditor/default.properties
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/resources/net/fckeditor/default.properties	(revision 1317)
+++ /FCKeditor.Java/branches/2.4/src/main/resources/net/fckeditor/default.properties	(revision 1318)
@@ -19,4 +19,10 @@
 fckeditor.basedir=/userfiles
 
+# sub-directories for each file type
+fckeditor.subdir.media.file=/file
+fckeditor.subdir.media.image=/image
+fckeditor.subdir.media.flash=/flash
+fckeditor.subdir.media.media=/media
+
 # allowed and denied extensions for each file type
 fckeditor.file.extensions.allowed=
