Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/FCKeditor.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/FCKeditor.java	(revision 2226)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/FCKeditor.java	(revision 2227)
@@ -45,5 +45,4 @@
 	private String instanceName;
 	private String value;
-	private String basePath;
 	private HttpServletRequest request;
 
@@ -52,10 +51,11 @@
 	private String width = PropertiesLoader.getProperty("fckeditor.width");
 	private String height = PropertiesLoader.getProperty("fckeditor.height");
-	private String defaultBasePath = PropertiesLoader.getProperty("fckeditor.basePath");
-
-	/**
-	 * Main constructor.<br>
+	private String basePath = PropertiesLoader.getProperty("fckeditor.basePath");
+
+	/**
+	 * Main constructor.<br />
 	 * All important settings are done here and will be preset by the defaults
-	 * taken from {@link PropertiesLoader}.
+	 * taken from {@link PropertiesLoader}. Any parameter except instanceName
+	 * failing {@link Utils#isNotBlank(String)} will be ignored.
 	 * 
 	 * @param request
@@ -69,4 +69,6 @@
 	 * @param toolbarSet
 	 *            toolbarSet name
+	 * @throws IllegalArgumentException
+	 *             when instanceName is not valid HTML id
 	 */
 	public FCKeditor(final HttpServletRequest request, final String instanceName,
@@ -74,17 +76,24 @@
 	        final String basePath) {
 		this.request = request;
-		this.instanceName = instanceName;
-		if (Utils.isNotEmpty(width))
+		if (Utils.isBlank(instanceName))
+			throw new IllegalArgumentException(
+					"instanceName must be a valid HTML id");
+		else
+			this.instanceName = instanceName;
+		if (Utils.isNotBlank(width))
 			this.width = width;
-		if (Utils.isNotEmpty(height))
+		if (Utils.isNotBlank(height))
 			this.height = height;
-		if (Utils.isNotEmpty(toolbarSet))
+		if (Utils.isNotBlank(toolbarSet))
 			this.toolbarSet = toolbarSet;
+		// TODO Should be check here for empty or blank?
 		if (Utils.isNotEmpty(value))
 			this.value = value;
-		if (Utils.isNotEmpty(basePath))
+			else
+				this.value = new String();
+		if (Utils.isNotBlank(basePath))
 			this.basePath = request.getContextPath().concat(basePath);
 		else
-			this.basePath = request.getContextPath().concat(defaultBasePath);
+			this.basePath = request.getContextPath().concat(this.basePath);
 
 		config = new FCKeditorConfig();
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/EditorTag.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/EditorTag.java	(revision 2226)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/EditorTag.java	(revision 2227)
@@ -123,7 +123,12 @@
 	 */
 	public int doStartTag() throws JspException {
-		fckEditor = new FCKeditor(
-				(HttpServletRequest) pageContext.getRequest(), instanceName,
-				width, height, toolbarSet, value, basePath);
+
+		try {
+			fckEditor = new FCKeditor((HttpServletRequest) pageContext
+					.getRequest(), instanceName, width, height, toolbarSet,
+					value, basePath);
+		} catch (IllegalArgumentException e) {
+			throw new JspException(e);
+		}
 
 		return EVAL_BODY_INCLUDE;
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Utils.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Utils.java	(revision 2226)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Utils.java	(revision 2227)
@@ -74,5 +74,6 @@
 	 * @param str
 	 *            to check
-	 * @return <code>true</code> if the string is <code>null</code>.
+	 * @return <code>true</code> if the string is <code>null</code> or
+	 *         empty.
 	 */
 	public static boolean isEmpty(final String str) {
@@ -84,5 +85,6 @@
 	 * 
 	 * @param str
-	 * @return <code>true</code> if the String is not empty and not
+	 *            to ckeck
+	 * @return <code>true</code> if the String is not empty or not
 	 *         <code>null</code>.
 	 */
@@ -90,3 +92,36 @@
 		return !isEmpty(str);
 	}
+
+	/**
+	 * Checks if a String is whitespace, empty or null.
+	 * 
+	 * @param str
+	 *            to check
+	 * @return <code>true</code> if the string is <code>null</code>, empty
+	 *         or contains whitespace only.
+	 */
+	public static boolean isBlank(final String str) {
+
+		if (isEmpty(str))
+			return true;
+
+		for (char c : str.toCharArray()) {
+			if (!Character.isWhitespace(c))
+				return false;
+		}
+
+		return true;
+	}
+
+	/**
+	 * Just a wrapper to {@link #isBlank(String)}.
+	 * 
+	 * @param str
+	 *            to check
+	 * @return <code>true</code> if the string is not <code>null</code>,
+	 *         not empty or does not contain whitespace only.
+	 */
+	public static boolean isNotBlank(final String str) {
+		return !isBlank(str);
+	}
 }
Index: /FCKeditor.Java/trunk/java-core/src/main/resources/META-INF/FCKeditor.tld
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/resources/META-INF/FCKeditor.tld	(revision 2226)
+++ /FCKeditor.Java/trunk/java-core/src/main/resources/META-INF/FCKeditor.tld	(revision 2227)
@@ -4,6 +4,5 @@
 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
 	http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
-	version="2.0"
->
+	version="2.0">
 	<description>
 		The FCKeditor Tag Library offers a very convenient way to create
@@ -17,5 +16,7 @@
 	<tag>
 		<description>
-			Creates a FCKeditor instance with the given parameters.
+			Creates a FCKeditor instance with the given parameters. Any
+			parameter except instanceName which is empty or contains
+			whitespaces only will be ignored.
 		</description>
 		<display-name>editor</display-name>
Index: /FCKeditor.Java/trunk/java-core/src/test/java/net/fckeditor/tool/UtilsTest.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/test/java/net/fckeditor/tool/UtilsTest.java	(revision 2226)
+++ /FCKeditor.Java/trunk/java-core/src/test/java/net/fckeditor/tool/UtilsTest.java	(revision 2227)
@@ -74,3 +74,63 @@
 	}
 
+	@Test
+	public void isBlank01() {
+		assertTrue(Utils.isBlank(null));
+	}
+
+	@Test
+	public void isBlank02() {
+		assertTrue(Utils.isBlank(""));
+	}
+
+	@Test
+	public void isBlank03() {
+		assertTrue(Utils.isBlank("   "));
+	}
+
+	@Test
+	public void isBlank04() {
+		assertTrue(Utils.isBlank("  \t  \n \r"));
+	}
+
+	@Test
+	public void isBlank05() {
+		assertFalse(Utils.isBlank(" h "));
+	}
+
+	@Test
+	public void isBlank06() {
+		assertFalse(Utils.isBlank("\t n "));
+	}
+
+	@Test
+	public void isNotBlank01() {
+		assertTrue(Utils.isNotBlank(" h "));
+	}
+
+	@Test
+	public void isNotBlank02() {
+		assertTrue(Utils.isNotBlank(" h \t "));
+	}
+
+	@Test
+	public void isNotBlank03() {
+		assertFalse(Utils.isNotBlank("  \t  \n \r"));
+	}
+
+	@Test
+	public void isNotBlank04() {
+		assertFalse(Utils.isNotBlank(null));
+	}
+
+	@Test
+	public void isNotBlank05() {
+		assertFalse(Utils.isNotBlank(""));
+	}
+
+	@Test
+	public void isNotBlank06() {
+		assertFalse(Utils.isNotBlank("  "));
+	}
+
 }
Index: /FCKeditor.Java/trunk/src/changes/changes.xml
===================================================================
--- /FCKeditor.Java/trunk/src/changes/changes.xml	(revision 2226)
+++ /FCKeditor.Java/trunk/src/changes/changes.xml	(revision 2227)
@@ -10,5 +10,5 @@
 			<action dev="mosipov" type="fix" issue="2355">FCK:editor output is not XHTML 1.0 compliant</action>
 			<action dev="mosipov" type="fix" issue="2359">fckeditor-java-demo fails in Glassfish</action>
-			
+			<action dev="mosipov" type="fix" issue="2372">Empty/non-set FCK:editor value causes NullPointerException</action>
 		</release>
 	</body>
