API changes
diff --git a/plugins/org.eclipse.jst.server.core/plugin.properties b/plugins/org.eclipse.jst.server.core/plugin.properties
index 4dc017a..d6c521b 100644
--- a/plugins/org.eclipse.jst.server.core/plugin.properties
+++ b/plugins/org.eclipse.jst.server.core/plugin.properties
@@ -11,28 +11,6 @@
 pluginName=Java Server Support
 providerName=IBM
 
-# Commands
-commandSetVMArguments=set VM arguments
-commandSetVMArgumentsDescription=Set the Java VM arguments
-commandSetPath=set system path
-commandSetPathDescription=Set the system path
-commandSetPathType=set system path option
-commandSetPathTypeDescription=Set the system path option
-commandAddSystemProperty=add system property
-commandAddSystemPropertyDescription=Add a system property
-commandModifySystemProperty=modify system property
-commandModifySystemPropertyDescription=Modify the system property
-commandRemoveSystemProperty=remove system property
-commandRemoveSystemPropertyDescription=Remove a system property
-commandAddToClasspath=add to class path
-commandAddToClasspathDescription=Add to the class path
-commandEditClasspath=edit class path
-commandEditClasspathDescription=Edit the class path
-commandReorderClasspath=reorder class path
-commandReorderClasspathDescrption=Reorder the class path
-commandRemoveFromClasspath=remove from class path
-commandRemoveFromClasspathDescription=Remove from the class path
-
 classpathContainerDescription=Server Classpath Container
 
 runtimeTypeName=J2EE Runtime Library
diff --git a/plugins/org.eclipse.jst.server.core/plugin.xml b/plugins/org.eclipse.jst.server.core/plugin.xml
index de93910..4808fd6 100644
--- a/plugins/org.eclipse.jst.server.core/plugin.xml
+++ b/plugins/org.eclipse.jst.server.core/plugin.xml
@@ -3,23 +3,22 @@
 
 <plugin id="org.eclipse.jst.server.core"
   name="%pluginName"
-  version="3.0.0"
+  version="1.0.0"
   provider-name="%providerName"
   class="org.eclipse.jst.server.core.internal.JavaServerPlugin">
 
   <requires>
-    <import plugin="org.eclipse.core.resources" />
-    <import plugin="org.eclipse.debug.core" />
-    <import plugin="org.eclipse.wst.server.core" />
-    <import plugin="org.eclipse.jdt.core" />
-    <import plugin="org.eclipse.jdt.launching" />
+    <import plugin="org.eclipse.core.resources"/>
+    <import plugin="org.eclipse.debug.core"/>
+    <import plugin="org.eclipse.wst.server.core"/>
+    <import plugin="org.eclipse.jdt.core"/>
+    <import plugin="org.eclipse.jdt.launching"/>
     <import plugin="org.eclipse.core.runtime"/>
   </requires>
 
   <runtime>
     <library name="sjavacore.jar">
       <export name="*"/>
-      <packages prefixes="org.eclipse.jst.server.core,org.eclipse.jst.server.j2ee"/>
     </library>
   </runtime>
 
@@ -28,15 +27,15 @@
       id="org.eclipse.jst.server.core.container"
       class="org.eclipse.jst.server.core.internal.RuntimeClasspathContainerInitializer"/>
   </extension>
-  
-  <extension point="org.eclipse.wst.server.core.moduleKinds">
-    <moduleKind
+
+  <extension point="org.eclipse.wst.server.core.moduleTypes">
+    <moduleType
        id="j2ee.web"
        name="%moduleTypeJ2EEWebName"/>
-    <moduleKind
+    <moduleType
        id="j2ee.ejb"
        name="%moduleTypeJ2EEEJBName"/>
-    <moduleKind
+    <moduleType
        id="j2ee.ear"
        name="%moduleTypeJ2EEEARName"/>
   </extension>
@@ -46,8 +45,7 @@
        id="org.eclipse.jst.server.core.runtimeType"
        name="%runtimeTypeName"
        description="%runtimeTypeDescription"
-       class="org.eclipse.jst.server.core.internal.GenericRuntime"
-       workingCopyClass="org.eclipse.jst.server.core.internal.GenericRuntimeWorkingCopy">
+       class="org.eclipse.jst.server.core.internal.GenericRuntime">
        <moduleType
          types="j2ee"
          versions="*"/>
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/ClasspathRuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/ClasspathRuntimeTargetHandler.java
index 67808f4..0556300 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/ClasspathRuntimeTargetHandler.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/ClasspathRuntimeTargetHandler.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -26,12 +26,11 @@
 import org.eclipse.jst.server.core.internal.RuntimeClasspathContainer;
 import org.eclipse.jst.server.core.internal.Trace;
 import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.model.IRuntimeTargetHandlerDelegate;
-
+import org.eclipse.wst.server.core.model.RuntimeTargetHandlerDelegate;
 /**
  * 
  */
-public abstract class ClasspathRuntimeTargetHandler implements IRuntimeTargetHandlerDelegate {
+public abstract class ClasspathRuntimeTargetHandler extends RuntimeTargetHandlerDelegate {
 	/* (non-Javadoc)
 	 * @see org.eclipse.wst.server.core.model.IRuntimeTargetDelegate#setRuntimeTarget(org.eclipse.core.resources.IProject, org.eclipse.wst.server.core.IRuntime)
 	 */
@@ -62,7 +61,7 @@
 			}
 			
 			List add = new ArrayList();
-			IClasspathEntry[] entries = getDelegateClasspathEntries(runtime);
+			IClasspathEntry[] entries = getDelegateClasspathEntries(runtime, monitor);
 			if (entries != null) {
 				size = entries.length;
 				for (int i = 0; i < size; i++)
@@ -73,7 +72,8 @@
 			if (ids != null) {
 				size = ids.length;
 				for (int i = 0; i < size; i++) {
-					IPath path = new Path(RuntimeClasspathContainer.SERVER_CONTAINER).append(getId()).append(runtime.getId());
+					String id2 = getRuntimeTargetHandler().getId();
+					IPath path = new Path(RuntimeClasspathContainer.SERVER_CONTAINER).append(id2).append(runtime.getId());
 					if (ids[i] != null)
 						path.append(ids[i]);
 					add.add(JavaCore.newContainerEntry(path));
@@ -223,7 +223,7 @@
 			return;
 		
 		try {
-			IClasspathEntry[] delegates = getDelegateClasspathEntries(runtime);
+			IClasspathEntry[] delegates = getDelegateClasspathEntries(runtime, monitor);
 			int delegateSize = 0;
 			if (delegates != null)
 				delegateSize = delegates.length;
@@ -298,9 +298,7 @@
 		return entries;
 	}
 
-	public abstract String getId();
-
-	public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime) {
+	public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime, IProgressMonitor monitor) {
 		return null;
 	}
 	
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/GenericRuntimeUtil.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/GenericRuntimeUtil.java
index 42cac9b..71c3e58 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/GenericRuntimeUtil.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/GenericRuntimeUtil.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -17,8 +17,18 @@
 public class GenericRuntimeUtil {
 	protected static final String RUNTIME_TYPE_ID = "org.eclipse.jst.server.core.runtimeType";
 
+	/**
+	 * Returns <code>true</code> if the given runtime is a generic J2EE runtime, and
+	 * <code>false</code> otherwise. The runtime may not be null.
+	 * 
+	 * @param runtime 
+	 * @return <code>true</code> if 
+	 */
 	public static boolean isGenericJ2EERuntime(IRuntime runtime) {
-		return (runtime != null && runtime.getRuntimeType() != null &&
+		if (runtime == null)
+			throw new IllegalArgumentException();
+
+		return (runtime.getRuntimeType() != null &&
 			runtime.getRuntimeType().getId().startsWith(RUNTIME_TYPE_ID));
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntime.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntime.java
index 60b3041..a45e713 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntime.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntime.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -10,19 +10,15 @@
  **********************************************************************/
 package org.eclipse.jst.server.core;
 
-import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jdt.launching.IVMInstall;
-
-import org.eclipse.wst.server.core.model.IRuntimeDelegate;
 /**
  * 
  */
-public interface IGenericRuntime extends IRuntimeDelegate {
-	public String getVMInstallTypeId();
-
-	public String getVMInstallId();
-
+public interface IGenericRuntime {
+	/**
+	 * Return the VM install (installed JRE) that this runtime is using.
+	 * 
+	 * @return the current VM install
+	 */
 	public IVMInstall getVMInstall();
-
-	public IStatus validate();
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntimeWorkingCopy.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntimeWorkingCopy.java
index 8182e0f..29319f5 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntimeWorkingCopy.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/IGenericRuntimeWorkingCopy.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -10,10 +10,15 @@
  **********************************************************************/
 package org.eclipse.jst.server.core;
 
-import org.eclipse.wst.server.core.model.IRuntimeWorkingCopyDelegate;
+import org.eclipse.jdt.launching.IVMInstall;
 /**
  *
  */
-public interface IGenericRuntimeWorkingCopy extends IGenericRuntime, IRuntimeWorkingCopyDelegate {
-	public void setVMInstall(String typeId, String id);
+public interface IGenericRuntimeWorkingCopy extends IGenericRuntime {
+	/**
+	 * Set the VM install (installed JRE) that this runtime is using.
+	 * 
+	 * @param vmInstall the VM install to use
+	 */
+	public void setVMInstall(IVMInstall vmInstall);
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntime.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntime.java
index 6959f4c..978bbbc 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntime.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntime.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -15,31 +15,26 @@
 import org.eclipse.jdt.launching.IVMInstallType;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jst.server.core.IGenericRuntime;
+import org.eclipse.jst.server.core.IGenericRuntimeWorkingCopy;
 import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.model.RuntimeDelegate;
 /**
  * 
  */
-public class GenericRuntime implements IGenericRuntime {
+public class GenericRuntime extends RuntimeDelegate implements IGenericRuntime, IGenericRuntimeWorkingCopy {
 	protected static final String PROP_VM_INSTALL_TYPE_ID = "vm-install-type-id";
 	protected static final String PROP_VM_INSTALL_ID = "vm-install-id";
 
-	protected IRuntime runtime;
-
 	public GenericRuntime() {
 		// do nothing
 	}
 
-	public void initialize(IRuntime newRuntime) {
-		this.runtime = newRuntime;
+	protected String getVMInstallTypeId() {
+		return getAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
 	}
 
-	public String getVMInstallTypeId() {
-		return runtime.getAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
-	}
-
-	public String getVMInstallId() {
-		return runtime.getAttribute(PROP_VM_INSTALL_ID, (String)null);
+	protected String getVMInstallId() {
+		return getAttribute(PROP_VM_INSTALL_ID, (String)null);
 	}
 
 	public IVMInstall getVMInstall() {
@@ -59,24 +54,42 @@
 	}
 	
 	public IStatus validate() {
-		if (runtime.getName() == null || runtime.getName().length() == 0)
-			return new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, JavaServerPlugin.getResource("%errorName"), null);
-
-		if (ServerUtil.isNameInUse(runtime))
-			return new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, JavaServerPlugin.getResource("%errorDuplicateRuntimeName"), null);
+		IStatus status = super.validate();
+		if (!status.isOK())
+			return status;
 		
+		IRuntime runtime = getRuntime();
+
 		IPath path = runtime.getLocation();
-		if (path == null || path.isEmpty())
-			return new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, "", null);
-		else if (!path.toFile().exists())
+		if (!path.toFile().exists())
 			return new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, JavaServerPlugin.getResource("%errorLocation"), null);
 		else if (getVMInstall() == null)
 			return new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, JavaServerPlugin.getResource("%errorJRE"), null);
 		else
 			return new Status(IStatus.OK, JavaServerPlugin.PLUGIN_ID, 0, "", null);
 	}
-	
-	public void dispose() {
-		// do nothing
+
+	public void setDefaults() {
+		IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
+		setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
+	}
+
+	public void setVMInstall(IVMInstall vmInstall) {
+		if (vmInstall == null) {
+			setVMInstall(null, null);
+		} else
+			setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
+	}
+
+	protected void setVMInstall(String typeId, String id) {
+		if (typeId == null)
+			setAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
+		else
+			setAttribute(PROP_VM_INSTALL_TYPE_ID, typeId);
+		
+		if (id == null)
+			setAttribute(PROP_VM_INSTALL_ID, (String)null);
+		else
+			setAttribute(PROP_VM_INSTALL_ID, id);
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntimeTargetHandler.java
index 254e749..e18fd09 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntimeTargetHandler.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntimeTargetHandler.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -14,6 +14,7 @@
 import java.util.List;
 
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.JavaCore;
@@ -26,8 +27,8 @@
  * 
  */
 public class GenericRuntimeTargetHandler extends ClasspathRuntimeTargetHandler {
-	public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime) {
-		GenericRuntime genericRuntime = (GenericRuntime) runtime.getDelegate();
+	public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime, IProgressMonitor monitor) {
+		GenericRuntime genericRuntime = (GenericRuntime) runtime.getAdapter(GenericRuntime.class);
 		IVMInstall vmInstall = genericRuntime.getVMInstall();
 		if (vmInstall != null) {
 			String name = vmInstall.getName();
@@ -37,7 +38,7 @@
 	}
 
 	public String getClasspathContainerLabel(IRuntime runtime, String id) {
-		return JavaServerPlugin.getResource("%runtimeTargetContainer");
+		return JavaServerPlugin.getResource("%runtimeTypeName");
 	}
 	
 	public String[] getClasspathEntryIds(IRuntime runtime) {
@@ -61,4 +62,4 @@
 	public String getId() {
 		return "org.eclipse.jst.server.core.runtimeTarget";
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntimeWorkingCopy.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntimeWorkingCopy.java
deleted file mode 100644
index ed684d7..0000000
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/GenericRuntimeWorkingCopy.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.core.internal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.core.IGenericRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-/**
- * 
- */
-public class GenericRuntimeWorkingCopy extends GenericRuntime implements IGenericRuntimeWorkingCopy {
-	protected IRuntimeWorkingCopy wc;
-
-	public void initialize(IRuntimeWorkingCopy runtime2) {
-		wc = runtime2;
-	}
-	
-	public void setDefaults() {
-		IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
-		setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
-	}
-
-	public void setVMInstall(String typeId, String id) {
-		if (typeId == null)
-			wc.setAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
-		else
-			wc.setAttribute(PROP_VM_INSTALL_TYPE_ID, typeId);
-		
-		if (id == null)
-			wc.setAttribute(PROP_VM_INSTALL_ID, (String)null);
-		else
-			wc.setAttribute(PROP_VM_INSTALL_ID, id);
-	}
-	
-	public void handleSave(byte id, IProgressMonitor monitor) {
-		// do nothing
-	}
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/JavaResources.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/JavaResources.java
similarity index 82%
rename from plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/JavaResources.java
rename to plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/JavaResources.java
index 742997d..c1bbb57 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/JavaResources.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/JavaResources.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -8,9 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-package org.eclipse.jst.server.core;
-
-import org.eclipse.jst.server.core.internal.JavaServerPlugin;
+package org.eclipse.jst.server.core.internal;
 /**
  * 
  */
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/JavaServerPlugin.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/JavaServerPlugin.java
index 605e475..b5cd4db 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/JavaServerPlugin.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/JavaServerPlugin.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/LaunchConfigurationUtil.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/LaunchConfigurationUtil.java
similarity index 84%
rename from plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/LaunchConfigurationUtil.java
rename to plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/LaunchConfigurationUtil.java
index 97d04d9..a44300a 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/LaunchConfigurationUtil.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/LaunchConfigurationUtil.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -8,12 +8,13 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-package org.eclipse.jst.server.core;
+package org.eclipse.jst.server.core.internal;
 
 import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
@@ -36,8 +37,8 @@
 	 * @return
 	 * @throws CoreException
 	 */
-	public static IRuntimeClasspathEntry[] getClasspath(IServer server, boolean create) throws CoreException {
-		ILaunchConfiguration config = server.getLaunchConfiguration(create);
+	public static IRuntimeClasspathEntry[] getClasspath(IServer server, boolean create, IProgressMonitor monitor) throws CoreException {
+		ILaunchConfiguration config = server.getLaunchConfiguration(create, monitor);
 		if (config == null)
 			return null;
 		
@@ -51,8 +52,8 @@
 	 * @param classpath
 	 * @throws CoreException
 	 */
-	public static void setClasspath(IServer server, IRuntimeClasspathEntry[] classpath) throws CoreException {
-		ILaunchConfiguration config = server.getLaunchConfiguration(true);
+	public static void setClasspath(IServer server, IRuntimeClasspathEntry[] classpath, IProgressMonitor monitor) throws CoreException {
+		ILaunchConfiguration config = server.getLaunchConfiguration(true, monitor);
 		ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
 		wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
 	
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainer.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainer.java
index b08e363..218dae6 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainer.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainer.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainerInitializer.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainerInitializer.java
index d99ce6a..1603cdc 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainerInitializer.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/RuntimeClasspathContainerInitializer.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -28,19 +28,19 @@
 	public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
 		if (containerPath.segmentCount() > 0) {
 			if (containerPath.segment(0).equals(RuntimeClasspathContainer.SERVER_CONTAINER)) {
-				ClasspathRuntimeTargetHandler delegate = null;
+				ClasspathRuntimeTargetHandler crth = null;
 				IRuntime runtime = null;
 				String id = "";
 				if (containerPath.segmentCount() > 2) {
 					IRuntimeTargetHandler handler = ServerCore.getRuntimeTargetHandler(containerPath.segment(1));
 					if (handler != null)
-						delegate = (ClasspathRuntimeTargetHandler) handler.getDelegate();
+						crth = (ClasspathRuntimeTargetHandler) handler.getAdapter(ClasspathRuntimeTargetHandler.class);
 					String runtimeId = containerPath.segment(2);
-					runtime = ServerCore.getResourceManager().getRuntime(runtimeId);
+					runtime = ServerCore.findRuntime(runtimeId);
 					if (containerPath.segmentCount() > 3)
 						id = containerPath.segment(3);
 				}
-				RuntimeClasspathContainer container = new RuntimeClasspathContainer(containerPath, delegate, runtime, id);
+				RuntimeClasspathContainer container = new RuntimeClasspathContainer(containerPath, crth, runtime, id);
 				JavaCore.setClasspathContainer(containerPath, new IJavaProject[] {project}, new IClasspathContainer[] {container}, null);
 			}
 		}
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/SystemProperty.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/SystemProperty.java
similarity index 88%
rename from plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/SystemProperty.java
rename to plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/SystemProperty.java
index c884c30..e57bcbb 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/SystemProperty.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/SystemProperty.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -8,7 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-package org.eclipse.jst.server.core;
+package org.eclipse.jst.server.core.internal;
 /**
  * A system property name/value pair.
  */
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Trace.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Trace.java
index 51273c9..1a8c110 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Trace.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Trace.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/Util.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Util.java
similarity index 95%
rename from plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/Util.java
rename to plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Util.java
index 9534967..81c313a 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/Util.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Util.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -8,7 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-package org.eclipse.jst.server.core;
+package org.eclipse.jst.server.core.internal;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/EJBBean.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/EJBBean.java
index a098867..fa51946 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/EJBBean.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/EJBBean.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -10,10 +10,10 @@
  **********************************************************************/
 package org.eclipse.jst.server.j2ee;
 
-import org.eclipse.wst.server.core.model.IModule;
-import org.eclipse.wst.server.core.model.IModuleObject;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
 
-public class EJBBean implements IModuleObject {
+public class EJBBean implements IModuleArtifact {
 	public static final String ID = "org.eclipse.jst.server.j2ee.ejb";
 
 	private IModule module;
@@ -39,14 +39,14 @@
 	}
 
 	/*
-	 * @see IModuleObject#getId()
+	 * @see IModuleArtifact#getId()
 	 */
 	public String getId() {
 		return ID;
 	}
 
 	/*
-	 * @see IModuleObject#getModule()
+	 * @see IModuleArtifact#getModule()
 	 */
 	public IModule getModule() {
 		return module;
@@ -63,4 +63,4 @@
 	public boolean hasLocalInterface() {
 		return local;
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IApplicationClientModule.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IApplicationClientModule.java
index 5230890..9d8587b 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IApplicationClientModule.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IApplicationClientModule.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IConnectorModule.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IConnectorModule.java
index e39dcb4..410065b 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IConnectorModule.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IConnectorModule.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -10,15 +10,15 @@
  **********************************************************************/
 package org.eclipse.jst.server.j2ee;
 
-import java.util.List;
+import org.eclipse.core.runtime.IPath;
 /**
  * A J2EE connector module.
  */
 public interface IConnectorModule extends IJ2EEModule {
 	/**
-	 * Returns the classpath as a list of absolute IPaths.
+	 * Returns the classpath as an array of absolute IPaths.
 	 * 
-	 * @param java.util.List
+	 * @param the classpath array
 	 */
-	public List getClasspath();
+	public IPath[] getClasspath();
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEJBModule.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEJBModule.java
index 5defe37..d382cab 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEJBModule.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEJBModule.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEnterpriseApplication.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEnterpriseApplication.java
index 4f25930..cb09ed9 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEnterpriseApplication.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IEnterpriseApplication.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -11,12 +11,10 @@
 package org.eclipse.jst.server.j2ee;
 
 import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.wst.server.core.model.IModule;
 /**
  * 
  */
-public interface IEnterpriseApplication extends IModule {
+public interface IEnterpriseApplication {
 	/**
 	 * Returns a version number in the form "x.y.z".
 	 * 
@@ -55,4 +53,4 @@
 	 * @return org.eclipse.core.runtime.IPath
 	 */
 	public IPath getLocation();
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IJ2EEModule.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IJ2EEModule.java
index ae79fd2..4c89f59 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IJ2EEModule.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IJ2EEModule.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -11,12 +11,10 @@
 package org.eclipse.jst.server.j2ee;
 
 import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.wst.server.core.model.IModule;
 /**
  * An abstract J2EE module that can be deployed to a server.
  */
-public interface IJ2EEModule extends IModule {
+public interface IJ2EEModule {
 	/**
 	 * Returns a version number in the form "x.y.z".
 	 * 
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchive.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchive.java
index fe63c0d..06ea2d7 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchive.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchive.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -11,12 +11,10 @@
 package org.eclipse.jst.server.j2ee;
 
 import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.wst.server.core.model.IModule;
 /**
  * 
  */
-public interface ILooseArchive extends IModule {
+public interface ILooseArchive {
 	/**
 	 * Returns the location of the root of the loose utility. This should
 	 * be an absolute path that is not workbench relative.
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchiveSupport.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchiveSupport.java
index bb9e381..0466280 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchiveSupport.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/ILooseArchiveSupport.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IWebModule.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IWebModule.java
index 848033f..6601f6a 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IWebModule.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/IWebModule.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/J2EEUtil.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/J2EEUtil.java
index 1e04376..21b6a18 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/J2EEUtil.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/J2EEUtil.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -11,11 +11,10 @@
 package org.eclipse.jst.server.j2ee;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.wst.server.core.IModule;
 import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.model.IModule;
 /**
  *
  */
@@ -23,22 +22,25 @@
 	/**
 	 * Returns the enterprise applications that the module is contained within.
 	 * 
-	 * @param module org.eclipse.jst.server.j2ee.IJ2EEModule
-	 * @return org.eclipse.jst.server.j2ee.IEnterpriseApplication
+	 * @param module
+	 * @return
 	 */
 	public static IEnterpriseApplication[] getEnterpriseApplications(IJ2EEModule module) {
-		Iterator iterator = ServerUtil.getModules("j2ee.ear", "*", false).iterator();
 		List list = new ArrayList();
-		while (iterator.hasNext()) {
-			IModule module2 = (IModule) iterator.next();
-			if (module2 instanceof IEnterpriseApplication) {
-				IEnterpriseApplication ear = (IEnterpriseApplication) module2;
-				IJ2EEModule[] modules = ear.getModules();
-				if (modules != null) {
-					int size = modules.length;
-					for (int i = 0; i < size; i++) {
-						if (modules[i].equals(module))
-							list.add(ear);
+		IModule[] modules = ServerUtil.getModules("j2ee.ear");
+		if (modules != null) {
+			int size = modules.length;
+			for (int i = 0; i < size; i++) {
+				IModule module2 = modules[i];
+				IEnterpriseApplication ear = (IEnterpriseApplication) module2.getAdapter(IEnterpriseApplication.class);
+				if (ear != null) {
+					IJ2EEModule[] modules2 = ear.getModules();
+					if (modules2 != null) {
+						int size2 = modules2.length;
+						for (int j = 0; j < size2; j++) {
+							if (modules2[j].equals(module))
+								list.add(ear);
+						}
 					}
 				}
 			}
@@ -47,4 +49,4 @@
 		list.toArray(ears);
 		return ears;
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiLaunchable.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiLaunchable.java
index cae4c73..a2e9313 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiLaunchable.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiLaunchable.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -12,7 +12,7 @@
 
 import java.util.Properties;
 
-import org.eclipse.wst.server.core.model.ILaunchable;
+import org.eclipse.wst.server.core.ILaunchable;
 /**
  * 
  */
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiObject.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiObject.java
index 3161ec3..6e2678b 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiObject.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/JndiObject.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -10,12 +10,12 @@
  **********************************************************************/
 package org.eclipse.jst.server.j2ee;
 
-import org.eclipse.wst.server.core.model.IModule;
-import org.eclipse.wst.server.core.model.IModuleObject;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
 /**
  * 
  */
-public class JndiObject implements IModuleObject {
+public class JndiObject implements IModuleArtifact {
 	public static final String ID = "org.eclipse.jst.server.j2ee.jndi";
 
 	private IModule module;
@@ -37,4 +37,4 @@
 	public String getJndiName() {
 		return jndiName;
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/Servlet.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/Servlet.java
index b4a05fc..7366767 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/Servlet.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/Servlet.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -10,12 +10,12 @@
  **********************************************************************/
 package org.eclipse.jst.server.j2ee;
 
-import org.eclipse.wst.server.core.model.IModule;
-import org.eclipse.wst.server.core.model.IModuleObject;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
 /**
  * 
  */
-public class Servlet implements IModuleObject {
+public class Servlet implements IModuleArtifact {
 	public static final String ID = "org.eclipse.jst.server.j2ee.servlet";
 
 	private IModule module;
@@ -47,4 +47,4 @@
 	public String toString() {
 		return "Servlet [module=" + module + ", class=" + className + ", alias=" + alias + "]";
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/WebResource.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/WebResource.java
index 4118747..f6e22e3 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/WebResource.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/j2ee/WebResource.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -12,12 +12,12 @@
 
 import org.eclipse.core.runtime.IPath;
 
-import org.eclipse.wst.server.core.model.IModule;
-import org.eclipse.wst.server.core.model.IModuleObject;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
 /**
  * 
  */
-public class WebResource implements IModuleObject {
+public class WebResource implements IModuleArtifact {
 	public static final String ID = "org.eclipse.jst.server.j2ee.webresource";
 
 	private IModule module;
@@ -43,4 +43,4 @@
 	public String toString() {
 		return "WebResource [module=" + module + ", path=" + path + "]";
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/plugin.properties b/plugins/org.eclipse.jst.server.tomcat.core/plugin.properties
index e130fc2..c5e8c4a 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/plugin.properties
+++ b/plugins/org.eclipse.jst.server.tomcat.core/plugin.properties
@@ -32,66 +32,49 @@
 serverLocatorDescription=Search for Apache Tomcat v3.2, v4.0, v4.1, and v5.0 servers.
 
 # runtime target
-targetJRE=Tomcat JRE
 target32runtime=Tomcat v3.2 runtime
 target40runtime=Tomcat v4.0 runtime
 target41runtime=Tomcat v4.1 runtime
 target50runtime=Tomcat v5.0 runtime
+target55runtime=Tomcat v5.5 runtime
 
 # --------------- Servers and Configurations ---------------
 tomcat32ServerType=Tomcat v3.2 Server
-tomcat32ServerShortType=Local Server
 tomcat32ServerDescription=Publishes and runs J2EE Web projects and server configurations to a local Tomcat server.
 
 tomcat32ConfigurationType=Tomcat v3.2 Server Configuration
-tomcat32ConfigurationShortType=Server Configuration
 tomcat32ConfigurationDescription=A server configuration for Tomcat version 3.2.
 
 tomcat40ServerType=Tomcat v4.0 Server
-tomcat40ServerShortType=Local Server
 tomcat40ServerDescription=Publishes and runs J2EE Web projects and server configurations to a local Tomcat server.
 
 tomcat40ConfigurationType=Tomcat v4.0 Server Configuration
-tomcat40ConfigurationShortType=Server Configuration
 tomcat40ConfigurationDescription=A server configuration for Tomcat version 4.0.
 
 tomcat41ServerType=Tomcat v4.1 Server
-tomcat41ServerShortType=Local Server
 tomcat41ServerDescription=Publishes and runs J2EE Web projects and server configurations to a local Tomcat server.
 
 tomcat41ConfigurationType=Tomcat v4.1 Server Configuration
-tomcat41ConfigurationShortType=Server Configuration
 tomcat41ConfigurationDescription=A server configuration for Tomcat version 4.1.
 
 tomcat50ServerType=Tomcat v5.0 Server
-tomcat50ServerShortType=Local Server
 tomcat50ServerDescription=Publishes and runs J2EE Web projects and server configurations to a local Tomcat server.
 
 tomcat50ConfigurationType=Tomcat v5.0 Server Configuration
-tomcat50ConfigurationShortType=Server Configuration
 tomcat50ConfigurationDescription=A server configuration for Tomcat version 5.0.
 
 tomcat55ServerType=Tomcat v5.5 Server
-tomcat55ServerShortType=Local Server
 tomcat55ServerDescription=Publishes and runs J2EE Web projects and server configurations to a local Tomcat server.
 
 tomcat55ConfigurationType=Tomcat v5.5 Server Configuration
-tomcat55ConfigurationShortType=Server Configuration
 tomcat55ConfigurationDescription=A server configuration for Tomcat version 5.5.
 
 # --------------- Tasks (progress monitors) ---------------
 savingTask=Saving...
 loadingTask=Loading...
-creatingTask=Creating...
 updatingConfigurationTask=Updating run-time configuration...
-publishTask=Publishing to Tomcat...
 publishConfigurationTask=Publishing the configuration...
-publishTempDirectoryTask=Updating the temp directory...
-publishCopyTask=Copying module {0}...
-publishExpandTask=Expanding module {0}...
-publishProjectTask=Publishing project {0}...
 publisherPublishTask=Publishing {0}...
-publisherDeleteTask=Deleting {0}...
 
 tomcatLaunchConfigurationType=Apache Tomcat
 
@@ -114,41 +97,28 @@
 configurationEditorActionEditWebModuleDescription=Change Web module path from {0} to {1}
 
 # --------------- General ---------------
-startingServer=Starting Tomcat server {0}. Debugging is disabled and breakpoints will be ignored.
-debuggingServer=Starting Tomcat server {0} in debug mode. Breakpoints are enabled.
-profilingServer=Starting Tomcat server {0}. Profiling is enabled and debugging has been disabled.
-errorInvalidConfiguration=Invalid server configuration
 canAddModule=Web module can be added to the server.
 canModifyModules=Web modules can be modified.
 
 # --------------- Errors and Info ---------------
-errorTitle=Tomcat Error
 errorInstallDir=The Tomcat installation directory is not correct. Edit the server and change the installation directory.
 errorJRE=The JRE could not be found. Edit the server and change the JRE location.
 errorPortInUse=Port {0} required by {1} is already in use.
-errorCouldNotLaunch=Tomcat could not be launched successfully.
-errorCouldNotFindDebugPort=Could not find a valid port for debugging.
-errorCouldNotLoadServer=Could not find a valid Tomcat server at the specified location.
 errorCouldNotLoadConfiguration=Could not find a valid Tomcat server configuration at the specified location.
-errorCouldNotSaveServer=Could not save the Tomcat server: {0}.
 errorCouldNotSaveConfiguration=Could not save the Tomcat server configuration: {0}.
 errorPublishConfiguration=Could not publish server configuration: {0}.
 errorWebModulesOnly=Tomcat only supports running J2EE Web modules.
-errorCancelled=Cancelled
 errorSpec32=Tomcat version 3.2 only supports J2EE 1.2 Web modules
 errorSpec40=Tomcat version 4.0 only supports J2EE 1.2 and 1.3 Web modules
 errorSpec41=Tomcat version 4.1 only supports J2EE 1.2 and 1.3 Web modules
 errorSpec50=Tomcat version 5.0 only supports J2EE 1.2 and 1.3 and 1.4 Web modules
 errorSpec55=Tomcat version 5.5 only supports J2EE 1.2 and 1.3 and 1.4 Web modules
 errorInstallDir=The Tomcat installation directory is not correct.
-errorJREDir=The JDK installation directory is not correct.
-errorRuntimeName=Enter a name for the runtime.
-errorDuplicateRuntimeName=Name is already in use.
 
-publishingStarted=Publishing started successfully
-publishingStopped=Publishing ended successfully
-
-infoPublishSuccess=Publishing was successful
-infoDefaultAvailable=A Tomcat server is available.
-
-projectCleanupSuccess=Old project {0} was removed successfully.
+# Actions (used in undo/redo menus)
+serverEditorActionSetSecure=set security
+serverEditorActionSetSecureDescription=Set the Tomcat security
+serverEditorActionSetDebugMode=set Tomcat debug mode
+serverEditorActionSetDebugModeDescription=Set Tomcat in debug mode
+serverEditorActionSetTestEnvironment=run modules from workspace
+serverEditorActionSetTestEnvironmentDescription=Run modules from the workspace
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml b/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml
index e232912..c330f72 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml
+++ b/plugins/org.eclipse.jst.server.tomcat.core/plugin.xml
@@ -3,130 +3,108 @@
 
 <plugin id="org.eclipse.jst.server.tomcat.core"
   name="%pluginName"
-  version="3.0.0"
+  version="1.0.0"
   provider-name="%providerName"
   class="org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin">
 
   <runtime>
      <library name="tomcatcore.jar">
         <export name="*"/>
-        <packages prefixes="org.eclipse.jst.server.tomcat.core"/>
      </library>
   </runtime>
 
   <requires>
-     <import plugin="org.eclipse.core.runtime" />
-     <import plugin="org.eclipse.core.resources" />
-     <import plugin="org.eclipse.debug.core" />
-     <import plugin="org.eclipse.jdt.core" />
-     <import plugin="org.eclipse.jdt.debug" />
-     <import plugin="org.eclipse.jdt.launching" />
-     <import plugin="org.eclipse.wst.server.core" />
-     <import plugin="org.eclipse.jst.server.core" />
+     <import plugin="org.eclipse.core.runtime"/>
+     <import plugin="org.eclipse.core.resources"/>
+     <import plugin="org.eclipse.debug.core"/>
+     <import plugin="org.eclipse.jdt.core"/>
+     <import plugin="org.eclipse.jdt.launching"/>
+     <import plugin="org.eclipse.wst.server.core"/>
+     <import plugin="org.eclipse.jst.server.core"/>
   </requires>
 
   <extension point="org.eclipse.wst.server.core.runtimeTypes">
     <runtimeType
-       id="org.eclipse.jst.server.tomcat.32.runtime"
+       id="org.eclipse.jst.server.tomcat.runtime.32"
        name="%runtimeTypeTomcat32Label"
        description="%runtimeTypeTomcat32Description"
        vendor="%apache"
        version="3.2"
        order="50"
-       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeWorkingCopy">
+       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime">
        <moduleType
          types="j2ee.web"
          versions="1.2"/>
     </runtimeType>
 
     <runtimeType
-       id="org.eclipse.jst.server.tomcat.40.runtime"
+       id="org.eclipse.jst.server.tomcat.runtime.40"
        name="%runtimeTypeTomcat40Label"
        description="%runtimeTypeTomcat40Description"
        vendor="%apache"
        version="4.0"
        order="52"
-       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeWorkingCopy">
+       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime">
        <moduleType
          types="j2ee.web"
          versions="1.2, 1.3"/>
     </runtimeType>
 
     <runtimeType
-       id="org.eclipse.jst.server.tomcat.41.runtime"
+       id="org.eclipse.jst.server.tomcat.runtime.41"
        name="%runtimeTypeTomcat41Label"
        description="%runtimeTypeTomcat41Description"
        vendor="%apache"
        version="4.1"
        order="54"
-       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeWorkingCopy">
+       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime">
        <moduleType
          types="j2ee.web"
          versions="1.2, 1.3"/>
     </runtimeType>
 
     <runtimeType
-       id="org.eclipse.jst.server.tomcat.50.runtime"
+       id="org.eclipse.jst.server.tomcat.runtime.50"
        name="%runtimeTypeTomcat50Label"
        description="%runtimeTypeTomcat50Description"
        vendor="%apache"
        version="5.0"
        order="56"
-       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeWorkingCopy">
+       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime">
        <moduleType
          types="j2ee.web"
          versions="1.2, 1.3, 1.4"/>
     </runtimeType>
 
     <runtimeType
-       id="org.eclipse.jst.server.tomcat.55.runtime"
+       id="org.eclipse.jst.server.tomcat.runtime.55"
        name="%runtimeTypeTomcat55Label"
        description="%runtimeTypeTomcat55Description"
        vendor="%apache"
        version="5.5"
        order="58"
-       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeWorkingCopy">
+       class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntime">
        <moduleType
          types="j2ee.web"
          versions="1.2, 1.3, 1.4"/>
     </runtimeType>
 
   </extension>
-  
+
   <extension point="org.eclipse.wst.server.core.runtimeLocators">
     <runtimeLocator
        id="org.eclipse.jst.server.tomcat.runtime.locator"
        name="%runtimeLocatorLabel"
        description="%runtimeLocatorDescription"
+       typeIds="org.eclipse.jst.server.tomcat.runtime.*"
        class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeLocator"/>
   </extension>
-  
+
   <extension point="org.eclipse.wst.server.core.runtimeTargetHandlers">
      <runtimeTargetHandler
-        id="org.eclipse.jst.server.tomcat.runtimeTarget.v32"
-        runtimeTypeIds="org.eclipse.jst.server.tomcat.32.runtime"
-        class="org.eclipse.jst.server.tomcat.core.internal.Tomcat32RuntimeTargetHandler"/>
-     <runtimeTargetHandler
-        id="org.eclipse.jst.server.tomcat.runtimeTarget.v40"
-        runtimeTypeIds="org.eclipse.jst.server.tomcat.40.runtime"
-        class="org.eclipse.jst.server.tomcat.core.internal.Tomcat40RuntimeTargetHandler"/>
-     <runtimeTargetHandler
-        id="org.eclipse.jst.server.tomcat.runtimeTarget.v41"
-        runtimeTypeIds="org.eclipse.jst.server.tomcat.41.runtime"
-        class="org.eclipse.jst.server.tomcat.core.internal.Tomcat41RuntimeTargetHandler"/>
-     <runtimeTargetHandler
-        id="org.eclipse.jst.server.tomcat.runtimeTarget.v50"
-        runtimeTypeIds="org.eclipse.jst.server.tomcat.50.runtime"
-        class="org.eclipse.jst.server.tomcat.core.internal.Tomcat50RuntimeTargetHandler"/>
-     <runtimeTargetHandler
-        id="org.eclipse.jst.server.tomcat.runtimeTarget.v55"
-        runtimeTypeIds="org.eclipse.jst.server.tomcat.55.runtime"
-        class="org.eclipse.jst.server.tomcat.core.internal.Tomcat55RuntimeTargetHandler"/>
+        id="org.eclipse.jst.server.tomcat.runtimeTarget"
+        runtimeTypeIds="org.eclipse.jst.server.tomcat.runtime.*"
+        class="org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeTargetHandler"/>
    </extension>
 
   <extension point="org.eclipse.wst.server.core.serverTypes">
@@ -134,144 +112,107 @@
        id="org.eclipse.jst.server.tomcat.32"
        name="%tomcat32ServerType"
        description="%tomcat32ServerDescription"
-       hosts="localhost"
+       supportsRemoteHosts="false"
        runtime="true"
        order="50"
-       monitorable="true"
+       startTimeout="45000"
+       stopTimeout="15000"
        initialState="stopped"
-       configurationTypeId="org.eclipse.jst.server.tomcat.32"
+       hasConfiguration="true"
        launchConfigId="org.eclipse.jst.server.tomcat.core.launchConfigurationType"
-       runtimeTypeId="org.eclipse.jst.server.tomcat.32.runtime"
+       runtimeTypeId="org.eclipse.jst.server.tomcat.runtime.32"
        class="org.eclipse.jst.server.tomcat.core.internal.TomcatServer"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerWorkingCopy">
+       behaviourClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour">
      </serverType>
      <serverType
        id="org.eclipse.jst.server.tomcat.40"
        name="%tomcat40ServerType"
        description="%tomcat40ServerDescription"
-       hosts="localhost"
+       supportsRemoteHosts="false"
        runtime="true"
        order="52"
-       monitorable="true"
+       startTimeout="45000"
+       stopTimeout="15000"
        initialState="stopped"
-       configurationTypeId="org.eclipse.jst.server.tomcat.40"
+       hasConfiguration="true"
        launchConfigId="org.eclipse.jst.server.tomcat.core.launchConfigurationType"
-       runtimeTypeId="org.eclipse.jst.server.tomcat.40.runtime"
+       runtimeTypeId="org.eclipse.jst.server.tomcat.runtime.40"
        class="org.eclipse.jst.server.tomcat.core.internal.TomcatServer"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerWorkingCopy">
+       behaviourClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour">
      </serverType>
      <serverType
        id="org.eclipse.jst.server.tomcat.41"
        name="%tomcat41ServerType"
        description="%tomcat41ServerDescription"
-       hosts="localhost"
+       supportsRemoteHosts="false"
        runtime="true"
        order="54"
-       monitorable="true"
+       startTimeout="45000"
+       stopTimeout="15000"
        initialState="stopped"
-       configurationTypeId="org.eclipse.jst.server.tomcat.41"
+       hasConfiguration="true"
        launchConfigId="org.eclipse.jst.server.tomcat.core.launchConfigurationType"
-       runtimeTypeId="org.eclipse.jst.server.tomcat.41.runtime"
+       runtimeTypeId="org.eclipse.jst.server.tomcat.runtime.41"
        class="org.eclipse.jst.server.tomcat.core.internal.TomcatServer"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerWorkingCopy">
+       behaviourClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour">
      </serverType>
      <serverType
        id="org.eclipse.jst.server.tomcat.50"
        name="%tomcat50ServerType"
        description="%tomcat50ServerDescription"
-       hosts="localhost"
+       supportsRemoteHosts="false"
        runtime="true"
        order="56"
-       monitorable="true"
+       startTimeout="45000"
+       stopTimeout="15000"
        initialState="stopped"
-       configurationTypeId="org.eclipse.jst.server.tomcat.50"
+       hasConfiguration="true"
        launchConfigId="org.eclipse.jst.server.tomcat.core.launchConfigurationType"
-       runtimeTypeId="org.eclipse.jst.server.tomcat.50.runtime"
+       runtimeTypeId="org.eclipse.jst.server.tomcat.runtime.50"
        class="org.eclipse.jst.server.tomcat.core.internal.TomcatServer"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerWorkingCopy">
+       behaviourClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour">
      </serverType>
      <serverType
        id="org.eclipse.jst.server.tomcat.55"
        name="%tomcat55ServerType"
        description="%tomcat55ServerDescription"
-       hosts="localhost"
+       supportsRemoteHosts="false"
        runtime="true"
        order="58"
-       monitorable="true"
+       startTimeout="45000"
+       stopTimeout="15000"
        initialState="stopped"
-       configurationTypeId="org.eclipse.jst.server.tomcat.55"
+       hasConfiguration="true"
        launchConfigId="org.eclipse.jst.server.tomcat.core.launchConfigurationType"
-       runtimeTypeId="org.eclipse.jst.server.tomcat.55.runtime"
+       runtimeTypeId="org.eclipse.jst.server.tomcat.runtime.55"
        class="org.eclipse.jst.server.tomcat.core.internal.TomcatServer"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerWorkingCopy">
+       behaviourClass="org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour">
      </serverType>
-   </extension>
-   
-   <extension point="org.eclipse.wst.server.core.serverLocators">
+  </extension>
+
+  <extension point="org.eclipse.wst.server.core.serverLocators">
     <serverLocator
        id="org.eclipse.jst.server.tomcat.server.locator"
        name="%serverLocatorLabel"
        description="%serverLocatorDescription"
-       hosts="local"
+       supportsRemoteHosts="false"
+       typeIds="org.eclipse.jst.server.tomcat.*"
        class="org.eclipse.jst.server.tomcat.core.internal.TomcatServerLocator"/>
   </extension>
-   
-   <extension point="org.eclipse.wst.server.core.serverConfigurationTypes">
-     <serverConfigurationType
-       id="org.eclipse.jst.server.tomcat.32"
-       name="%tomcat32ConfigurationType"
-       description="%tomcat32ConfigurationDescription"
-       isFolder="true"
-       class="org.eclipse.jst.server.tomcat.core.internal.Tomcat32Configuration"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.Tomcat32ConfigurationWorkingCopy">
-     </serverConfigurationType>
-     <serverConfigurationType
-       id="org.eclipse.jst.server.tomcat.40"
-       name="%tomcat40ConfigurationType"
-       description="%tomcat40ConfigurationDescription"
-       isFolder="true"
-       class="org.eclipse.jst.server.tomcat.core.internal.Tomcat40Configuration"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.Tomcat40ConfigurationWorkingCopy">
-     </serverConfigurationType>
-     <serverConfigurationType
-       id="org.eclipse.jst.server.tomcat.41"
-       name="%tomcat41ConfigurationType"
-       description="%tomcat41ConfigurationDescription"
-       isFolder="true"
-       class="org.eclipse.jst.server.tomcat.core.internal.Tomcat41Configuration"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.Tomcat41ConfigurationWorkingCopy">
-     </serverConfigurationType>
-     <serverConfigurationType
-       id="org.eclipse.jst.server.tomcat.50"
-       name="%tomcat50ConfigurationType"
-       description="%tomcat50ConfigurationDescription"
-       isFolder="true"
-       class="org.eclipse.jst.server.tomcat.core.internal.Tomcat50Configuration"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.Tomcat50ConfigurationWorkingCopy">
-     </serverConfigurationType>
-     <serverConfigurationType
-       id="org.eclipse.jst.server.tomcat.55"
-       name="%tomcat55ConfigurationType"
-       description="%tomcat55ConfigurationDescription"
-       isFolder="true"
-       class="org.eclipse.jst.server.tomcat.core.internal.Tomcat55Configuration"
-       workingCopyClass="org.eclipse.jst.server.tomcat.core.internal.Tomcat55ConfigurationWorkingCopy">
-     </serverConfigurationType>
-   </extension>
 
-   <extension point="org.eclipse.wst.server.core.launchableAdapters">
-      <launchableAdapter
-         class="org.eclipse.jst.server.tomcat.core.internal.TomcatLaunchableAdapterDelegate"
-         id="org.eclipse.jst.server.tomcat.web"/>
-   </extension>
+  <extension point="org.eclipse.wst.server.core.launchableAdapters">
+     <launchableAdapter
+        class="org.eclipse.jst.server.tomcat.core.internal.TomcatLaunchableAdapterDelegate"
+        id="org.eclipse.jst.server.tomcat.web"/>
+  </extension>
    
-   <extension point="org.eclipse.debug.core.sourcePathComputers">
+  <extension point="org.eclipse.debug.core.sourcePathComputers">
      <sourcePathComputer
         id="org.eclipse.jst.server.tomcat.core.sourcePathComputer"
         class="org.eclipse.jst.server.tomcat.core.internal.TomcatSourcePathComputerDelegate"/>
-   </extension>
+  </extension>
    
-   <extension point="org.eclipse.debug.core.launchConfigurationTypes">
+  <extension point="org.eclipse.debug.core.launchConfigurationTypes">
      <launchConfigurationType
         id="org.eclipse.jst.server.tomcat.core.launchConfigurationType"
         name="%tomcatLaunchConfigurationType"
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/IMimeMapping.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/IMimeMapping.java
index e269443..54badf5 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/IMimeMapping.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/IMimeMapping.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,19 +8,22 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core;
 /**
  * 
  */
 public interface IMimeMapping {
 	/**
 	 * Returns the extension.
-	 * @return java.lang.String
+	 * 
+	 * @return the extension
 	 */
 	public String getExtension();
 
 	/**
 	 * Returns the mime type.
-	 * @return java.lang.String
+	 * 
+	 * @return the mime type
 	 */
 	public String getMimeType();
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfiguration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfiguration.java
index e0a2b4b..fbb6ca1 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfiguration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfiguration.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,29 +8,31 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import java.util.List;
+package org.eclipse.jst.server.tomcat.core;
 
-import org.eclipse.wst.server.core.model.IServerConfigurationDelegate;
+import java.util.List;
 /**
  * 
  */
-public interface ITomcatConfiguration extends IServerConfigurationDelegate {
+public interface ITomcatConfiguration {
 	/**
 	 * Returns a list of mime mappings.
-	 * @return java.util.List
+	 * 
+	 * @return mime mappings
 	 */
 	public List getMimeMappings();
 	
 	/**
 	 * Returns a list of ServerPorts that this configuration uses.
 	 *
-	 * @return java.util.List
+	 * @return the server ports
 	 */
 	public List getServerPorts();
 
 	/**
 	 * Return a list of the web modules in this server.
-	 * @return java.util.List
+	 * 
+	 * @return the web modules
 	 */
 	public List getWebModules();
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfigurationWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfigurationWorkingCopy.java
index 3028367..1f73e3b 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfigurationWorkingCopy.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatConfigurationWorkingCopy.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,9 +8,9 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.wst.server.core.model.IServerConfigurationWorkingCopyDelegate;
+package org.eclipse.jst.server.tomcat.core;
 
-public interface ITomcatConfigurationWorkingCopy extends ITomcatConfiguration, IServerConfigurationWorkingCopyDelegate {
+public interface ITomcatConfigurationWorkingCopy extends ITomcatConfiguration {
 	/**
 	 * Add a web module.
 	 *
@@ -22,6 +21,7 @@
 	
 	/**
 	 * Change a web module.
+	 * 
 	 * @param index int
 	 * @param docBase java.lang.String
 	 * @param path java.lang.String
@@ -30,7 +30,8 @@
 	public void modifyWebModule(int index, String docBase, String path, boolean reloadable);
 
 	/**
-	 * Removes a web module.
+	 * Remove a web module.
+	 * 
 	 * @param index int
 	 */
 	public void removeWebModule(int index);
@@ -45,6 +46,7 @@
 
 	/**
 	 * Change a mime mapping.
+	 * 
 	 * @param index int
 	 * @param map MimeMapping
 	 */
@@ -59,8 +61,9 @@
 	public void modifyServerPort(String id, int port);
 
 	/**
-	 * Removes a mime mapping.
+	 * Remove a mime mapping.
+	 * 
 	 * @param index int
 	 */
 	public void removeMimeMapping(int index);
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntime.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntime.java
index 203ef25..8386a7e 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntime.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntime.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,20 +8,26 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core;
+
 import java.util.List;
 
 import org.eclipse.jdt.launching.IVMInstall;
-
-import org.eclipse.wst.server.core.model.IRuntimeDelegate;
 /**
  * 
  */
-public interface ITomcatRuntime extends IRuntimeDelegate {
-	public String getVMInstallTypeId();
-
-	public String getVMInstallId();
-
+public interface ITomcatRuntime {
+	/**
+	 * Return the VM install (installed JRE) that this runtime is using.
+	 * 
+	 * @return the current VM install
+	 */
 	public IVMInstall getVMInstall();
-	
+
+	/**
+	 * Returns the runtime classpath that is used by this runtime.
+	 * 
+	 * @return the runtime classpath
+	 */
 	public List getRuntimeClasspath();
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntimeWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntimeWorkingCopy.java
index 2be3301..e11b214 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntimeWorkingCopy.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatRuntimeWorkingCopy.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,10 +8,18 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.wst.server.core.model.IRuntimeWorkingCopyDelegate;
+package org.eclipse.jst.server.tomcat.core;
+
+import org.eclipse.jdt.launching.IVMInstall;
+
 /**
  *
  */
-public interface ITomcatRuntimeWorkingCopy extends ITomcatRuntime, IRuntimeWorkingCopyDelegate {
-	public void setVMInstall(String typeId, String id);
+public interface ITomcatRuntimeWorkingCopy extends ITomcatRuntime {
+	/**
+	 * Set the VM install (installed JRE) that this runtime is using.
+	 * 
+	 * @param vmInstall the VM install to use
+	 */
+	public void setVMInstall(IVMInstall vmInstall);
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServer.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServer.java
index d22ca1c..66352ca 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServer.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServer.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,23 +8,20 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IProcess;
+package org.eclipse.jst.server.tomcat.core;
 
-import org.eclipse.wst.server.core.model.IServerDelegate;
 import org.eclipse.wst.server.core.model.IURLProvider;
 /**
  * 
  */
-public interface ITomcatServer extends IServerDelegate, IURLProvider {
+public interface ITomcatServer extends IURLProvider {
 	public static final String PROPERTY_SECURE = "secure";
 	public static final String PROPERTY_DEBUG = "debug";
 	public static final String PROPERTY_TEST_ENVIRONMENT = "testEnvironment";
 
 	/**
-	 * Returns true if the process is set to run in debug mode.
+	 * Returns <code>true</code> if the server is set to run in Tomcat debug mode, and
+	 * <code>false</code> otherwise.
 	 * This feature only works with Tomcat v4.0.
 	 *
 	 * @return boolean
@@ -38,36 +34,26 @@
 	 * @return boolean
 	 */
 	public boolean isSecure();
-	
+
 	/**
-	 * Returns true if this is a test (run code out of the workbench) environment server.
+	 * Returns true if this is a test (publish and run code out of the
+	 * workbench) environment server.
 	 *
 	 * @return boolean
 	 */
 	public boolean isTestEnvironment();
-	
+
 	/**
 	 * Returns the main class that is used to launch the Tomcat server.
 	 * 
 	 * @return
 	 */
 	public String getRuntimeClass();
-
-	/**
-	 * Set the process that is monitored for Tomcat startup and shutdown.
-	 * Warning: Do not call this method unless you know what you're doing;
-	 * it should only be used in rare cases.
-	 * 
-	 * @param newProcess
-	 */
-	public void setProcess(IProcess newProcess);
 	
 	/**
-	 * Setup for starting the server.
+	 * Return the Tomcat configuration model.
 	 * 
-	 * @param launch ILaunch
-	 * @param launchMode String
-	 * @param monitor IProgressMonitor
+	 * @return
 	 */
-	public void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException;
+	public ITomcatConfiguration getServerConfiguration();
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServerBehaviour.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServerBehaviour.java
new file mode 100644
index 0000000..4c51a08
--- /dev/null
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServerBehaviour.java
@@ -0,0 +1,45 @@
+/**********************************************************************
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.jst.server.tomcat.core;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IProcess;
+/**
+ * 
+ */
+public interface ITomcatServerBehaviour {
+	/**
+	 * Returns the main class that is used to launch the Tomcat server.
+	 * 
+	 * @return
+	 */
+	public String getRuntimeClass();
+
+	/**
+	 * Set the process that is monitored for Tomcat startup and shutdown.
+	 * Warning: Do not call this method unless you know what you're doing;
+	 * it should only be used in rare cases.
+	 * 
+	 * @param newProcess
+	 */
+	public void setProcess(IProcess newProcess);
+	
+	/**
+	 * Setup for starting the server.
+	 * 
+	 * @param launch ILaunch
+	 * @param launchMode String
+	 * @param monitor IProgressMonitor
+	 */
+	public void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException;
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServerWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServerWorkingCopy.java
index 2d54aa4..b8a09c4 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServerWorkingCopy.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatServerWorkingCopy.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,13 +8,13 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.wst.server.core.model.IServerWorkingCopyDelegate;
+package org.eclipse.jst.server.tomcat.core;
 /**
  * 
  */
-public interface ITomcatServerWorkingCopy extends ITomcatServer, IServerWorkingCopyDelegate {
+public interface ITomcatServerWorkingCopy extends ITomcatServer {
 	/**
-	 * Sets this process to debug mode. This feature only works
+	 * Sets this process to Tomcat debug mode. This feature only works
 	 * with Tomcat v4.0 and above.
 	 *
 	 * @param b boolean
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatWebModule.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatWebModule.java
index 5edf606..edc32b3 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatWebModule.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/ITomcatWebModule.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,8 +8,9 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core;
 /**
- * 
+ * A Web module deployed on Tomcat.
  */
 public interface ITomcatWebModule {
 	/**
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/WebModule.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/WebModule.java
index 8bb2640..5f41129 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/WebModule.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/WebModule.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core;
 /**
  * A Web module.
  */
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java
index caddc6f..9bc75ad 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,13 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.util.List;
 
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jst.server.j2ee.IWebModule;
-
 /**
  * 
  */
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/MimeMapping.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/MimeMapping.java
index 6954b41..0afd4a6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/MimeMapping.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/MimeMapping.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import org.eclipse.jst.server.tomcat.core.IMimeMapping;
 /**
  * A mime mapping.
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/PingThread.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/PingThread.java
deleted file mode 100644
index 89802ae..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/PingThread.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.io.FileNotFoundException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-
-import org.eclipse.debug.core.ILaunchManager;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerState;
-/**
- * Thread used to ping server to test when it is started.
- */
-public class PingThread extends Thread {
-	// delay before pinging starts
-	private static final int PING_DELAY = 2000;
-
-	// delay between pings
-	private static final int PING_INTERVAL = 250;
-
-	// maximum number of pings before giving up
-	private static final int MAX_PINGS = 56; // total: 16 seconds
-
-	private boolean stop = false;
-	private String mode;
-	private String url = "";
-	private TomcatServer serverType;
-	private IServerState control;
-
-	public PingThread(TomcatServer serverType, IServerState control, String url, String mode) {	super();
-		this.control = control;
-		this.url = url;
-		this.mode = mode;
-		this.serverType = serverType;
-		setDaemon(true);
-	}
-	
-	/**
-	 * Ping the server until it is started. Then set the server
-	 * state to SERVER_STARTED.
-	 */
-	public void run() {
-		int count = 0;
-		try {
-			sleep(PING_DELAY);
-		} catch (Exception e) { }
-		while (!stop) {
-			try {
-				if (count == MAX_PINGS) {
-					serverType.stop();
-					stop = true;
-					break;
-				}
-				Trace.trace(Trace.FINEST, "Ping: pinging");
-				URL pingUrl = new URL(url);
-				URLConnection conn = pingUrl.openConnection();
-				((HttpURLConnection)conn).getResponseCode();
-				count++;
-	
-				// ping worked - server is up
-				if (!stop) {
-					Trace.trace(Trace.FINEST, "Ping: success");
-					Thread.sleep(200);
-					if (ILaunchManager.DEBUG_MODE.equals(mode))
-						control.setServerState(IServer.SERVER_STARTED_DEBUG);
-					else if (ILaunchManager.PROFILE_MODE.equals(mode))
-						control.setServerState(IServer.SERVER_STARTED_PROFILE);
-					else
-						control.setServerState(IServer.SERVER_STARTED);
-				}
-				stop = true;
-			} catch (FileNotFoundException fe) {
-				try { Thread.sleep(200); } catch (Exception e) { }
-				if (ILaunchManager.DEBUG_MODE.equals(mode))
-					control.setServerState(IServer.SERVER_STARTED_DEBUG);
-				else if (ILaunchManager.PROFILE_MODE.equals(mode))
-					control.setServerState(IServer.SERVER_STARTED_PROFILE);
-				else
-					control.setServerState(IServer.SERVER_STARTED);
-				stop = true;
-			} catch (Exception e) {
-				Trace.trace(Trace.FINEST, "Ping: failed");
-				// pinging failed
-				if (!stop) {
-					try {
-						sleep(PING_INTERVAL);
-					} catch (InterruptedException e2) { }
-				}
-			}
-		}
-	}
-	
-	/**
-	 * Tell the pinging to stop.
-	 */
-	public void stopPinging() {
-		//Trace.trace("Ping: stopping");
-		stop = true;
-	}
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProgressUtil.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ProgressUtil.java
similarity index 92%
copy from plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProgressUtil.java
copy to plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ProgressUtil.java
index 9132b02..85bdce2 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProgressUtil.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ProgressUtil.java
@@ -1,14 +1,14 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
  *
  * Contributors:
- *     IBM Corporation - Initial API and implementation
+ *    IBM - Initial API and implementation
  **********************************************************************/
-package org.eclipse.wst.server.core.util;
+package org.eclipse.jst.server.tomcat.core.internal;
 
 import org.eclipse.core.runtime.*;
 /**
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Configuration.java
index 2da373b..c057d77 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Configuration.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.*;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -17,6 +18,8 @@
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.runtime.*;
+import org.eclipse.jst.server.tomcat.core.IMimeMapping;
+import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.xml.Factory;
 import org.eclipse.jst.server.tomcat.core.internal.xml.XMLUtil;
@@ -28,8 +31,8 @@
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 
-import org.eclipse.wst.server.core.model.IServerPort;
-import org.eclipse.wst.server.core.util.ProgressUtil;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServerPort;
 import org.eclipse.wst.server.core.util.ServerPort;
 /**
  * Tomcat v3.2 server configuration.
@@ -54,8 +57,8 @@
 	/**
 	 * Tomcat32Configuration constructor comment.
 	 */
-	public Tomcat32Configuration() {
-		super();
+	public Tomcat32Configuration(IFolder path) {
+		super(path);
 	}
 	
 	/**
@@ -449,4 +452,178 @@
 			throw new CoreException(new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorCouldNotSaveConfiguration", new String[] {e.getLocalizedMessage()}), e));
 		}
 	}
-}
+	
+	
+	/**
+	 * Adds a mime mapping.
+	 * @param map MimeMapping
+	 */
+	public void addMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.addMimeMapping(index, map);
+		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
+	}
+
+	/**
+	 * Add a web module.
+	 * @param module org.eclipse.jst.server.tomcat.WebModule
+	 */
+	public void addWebModule(int index, ITomcatWebModule module) {
+		try {
+			ContextManager contextManager = server.getContextManager();
+			Context context = (Context) contextManager.createElement(index, "Context");
+	
+			context.setPath(module.getPath());
+			context.setDocBase(module.getDocumentBase());
+			context.setReloadable(module.isReloadable() ? "true" : "false");
+			if (module.getMemento() != null && module.getMemento().length() > 0)
+				context.setSource(module.getMemento());
+			isServerDirty = true;
+			firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
+		} catch (Exception e) {
+			Trace.trace("Error adding web module", e);
+		}
+	}
+	
+	/**
+	 * Localize the web projects in this configuration.
+	 *
+	 * @param file java.io.File
+	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
+	 */
+	public void localizeConfiguration(IPath path, TomcatServer serverType, IRuntime runtime, IProgressMonitor monitor) {
+		try {
+			monitor = ProgressUtil.getMonitorFor(monitor);
+			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
+	
+			Tomcat32Configuration config = new Tomcat32Configuration(null);
+			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 30));
+	
+			if (monitor.isCanceled())
+				return;
+	
+			if (serverType.isTestEnvironment()) {
+				config.server.getContextManager().setHome(runtime.getLocation().toOSString());
+				config.isServerDirty = true;
+			} else {
+				//IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().createWorkingCopy();
+				//Tomcat32Configuration cfg = (Tomcat32Configuration) scwc.getAdapter(Tomcat32Configuration.class);
+				config.localizeWebModules();
+			}
+	
+			monitor.worked(40);
+	
+			if (monitor.isCanceled())
+				return;
+
+			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 30));
+	
+			if (!monitor.isCanceled())
+				monitor.done();
+		} catch (Exception e) {
+			Trace.trace("Error localizing configuration", e);
+		}
+	}
+	
+	/**
+	 * Go through all of the web modules and make the document
+	 * base "local" to the configuration.
+	 */
+	protected void localizeWebModules() {
+		List modules = getWebModules();
+
+		int size = modules.size();
+		for (int i = 0; i < size; i++) {
+			WebModule module = (WebModule) modules.get(i);
+			String memento = module.getMemento();
+			if (memento != null && memento.length() > 0) {
+				// update document base to a relative ref
+				String docBase = getPathPrefix() + module.getPath();
+				if (docBase.startsWith("/") || docBase.startsWith("\\"))
+					docBase = docBase.substring(1);
+				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
+			}
+		}
+	}
+	
+	/**
+	 * Change the extension of a mime mapping.
+	 * @param index int
+	 * @param newExtension java.lang.String
+	 */
+	public void modifyMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.modifyMimeMapping(index, map);
+		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
+	}
+	
+	/**
+	 * Modify the port with the given id.
+	 *
+	 * @param id java.lang.String
+	 * @param port int
+	 */
+	public void modifyServerPort(String id, int port) {
+		try {
+			int con = Integer.parseInt(id);
+			Connector connector = server.getContextManager().getConnector(con);
+	
+			int size = connector.getParameterCount();
+			for (int i = 0; i < size; i++) {
+				Parameter p = connector.getParameter(i);
+				if ("port".equals(p.getName())) {
+					p.setValue(port + "");
+					isServerDirty = true;
+					firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error modifying server port " + id, e);
+		}
+	}
+	
+	/**
+	 * Change a web module.
+	 * @param index int
+	 * @param docBase java.lang.String
+	 * @param path java.lang.String
+	 * @param reloadable boolean
+	 */
+	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
+		try {
+			ContextManager contextManager = server.getContextManager();
+			Context context = contextManager.getContext(index);
+			context.setPath(path);
+			context.setDocBase(docBase);
+			context.setReloadable(reloadable ? "true" : "false");
+			isServerDirty = true;
+			WebModule module = new WebModule(path, docBase, null, reloadable);
+			firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
+		} catch (Exception e) {
+			Trace.trace("Error modifying web module " + index, e);
+		}
+	}
+	
+	/**
+	 * Removes a mime mapping.
+	 * @param index int
+	 */
+	public void removeMimeMapping(int index) {
+		webAppDocument.removeMimeMapping(index);
+		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
+	}
+	
+	/**
+	 * Removes a web module.
+	 * @param index int
+	 */
+	public void removeWebModule(int index) {
+		try {
+			ContextManager contextManager = server.getContextManager();
+			contextManager.removeElement("Context", index);
+			isServerDirty = true;
+			firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
+		} catch (Exception e) {
+			Trace.trace("Error removing web module " + index, e);
+		}
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32ConfigurationWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32ConfigurationWorkingCopy.java
deleted file mode 100644
index 823ff60..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32ConfigurationWorkingCopy.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.server.tomcat.core.IMimeMapping;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
-import org.eclipse.jst.server.tomcat.core.WebModule;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server32.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server32.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server32.ContextManager;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server32.Parameter;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.util.ProgressUtil;
-/**
- * Tomcat v3.2 server configuration.
- */
-public class Tomcat32ConfigurationWorkingCopy extends Tomcat32Configuration implements ITomcatConfigurationWorkingCopy {
-	protected IServerConfigurationWorkingCopy wc;
-
-	/**
-	 * Tomcat32Configuration constructor comment.
-	 */
-	public Tomcat32ConfigurationWorkingCopy() {
-		super();
-	}
-	
-	public void initialize(IServerConfigurationWorkingCopy wc2) {
-		this.wc = wc2;
-	}
-	
-	public void setDefaults() { }
-	
-	public void handleSave(byte id, IProgressMonitor monitor) { }
-	
-	/**
-	 * Adds a mime mapping.
-	 * @param map MimeMapping
-	 */
-	public void addMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.addMimeMapping(index, map);
-		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
-	}
-
-	/**
-	 * Add a web module.
-	 * @param module org.eclipse.jst.server.tomcat.WebModule
-	 */
-	public void addWebModule(int index, ITomcatWebModule module) {
-		try {
-			ContextManager contextManager = server.getContextManager();
-			Context context = (Context) contextManager.createElement(index, "Context");
-	
-			context.setPath(module.getPath());
-			context.setDocBase(module.getDocumentBase());
-			context.setReloadable(module.isReloadable() ? "true" : "false");
-			if (module.getMemento() != null && module.getMemento().length() > 0)
-				context.setSource(module.getMemento());
-			isServerDirty = true;
-			firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
-		} catch (Exception e) {
-			Trace.trace("Error adding web module", e);
-		}
-	}
-	
-	/**
-	 * Localize the web projects in this configuration.
-	 *
-	 * @param file java.io.File
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 */
-	public void localizeConfiguration(IPath path, TomcatServer serverType, IRuntime runtime, IProgressMonitor monitor) {
-		try {
-			monitor = ProgressUtil.getMonitorFor(monitor);
-			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
-	
-			Tomcat32Configuration config = new Tomcat32Configuration();
-			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 30));
-	
-			if (monitor.isCanceled())
-				return;
-	
-			if (serverType.isTestEnvironment()) {
-				config.server.getContextManager().setHome(runtime.getLocation().toOSString());
-				config.isServerDirty = true;
-			} else {
-				IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().getWorkingCopy();
-				((Tomcat32ConfigurationWorkingCopy) scwc.getDelegate()).localizeWebModules();
-			}
-	
-			monitor.worked(40);
-	
-			if (monitor.isCanceled())
-				return;
-
-			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 30));
-	
-			if (!monitor.isCanceled())
-				monitor.done();
-		} catch (Exception e) {
-			Trace.trace("Error localizing configuration", e);
-		}
-	}
-	
-	/**
-	 * Go through all of the web modules and make the document
-	 * base "local" to the configuration.
-	 */
-	protected void localizeWebModules() {
-		List modules = getWebModules();
-
-		int size = modules.size();
-		for (int i = 0; i < size; i++) {
-			WebModule module = (WebModule) modules.get(i);
-			String memento = module.getMemento();
-			if (memento != null && memento.length() > 0) {
-				// update document base to a relative ref
-				String docBase = getPathPrefix() + module.getPath();
-				if (docBase.startsWith("/") || docBase.startsWith("\\"))
-					docBase = docBase.substring(1);
-				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
-			}
-		}
-	}
-	
-	/**
-	 * Change the extension of a mime mapping.
-	 * @param index int
-	 * @param newExtension java.lang.String
-	 */
-	public void modifyMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.modifyMimeMapping(index, map);
-		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
-	}
-	
-	/**
-	 * Modify the port with the given id.
-	 *
-	 * @param id java.lang.String
-	 * @param port int
-	 */
-	public void modifyServerPort(String id, int port) {
-		try {
-			int con = Integer.parseInt(id);
-			Connector connector = server.getContextManager().getConnector(con);
-	
-			int size = connector.getParameterCount();
-			for (int i = 0; i < size; i++) {
-				Parameter p = connector.getParameter(i);
-				if ("port".equals(p.getName())) {
-					p.setValue(port + "");
-					isServerDirty = true;
-					firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error modifying server port " + id, e);
-		}
-	}
-	
-	/**
-	 * Change a web module.
-	 * @param index int
-	 * @param docBase java.lang.String
-	 * @param path java.lang.String
-	 * @param reloadable boolean
-	 */
-	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
-		try {
-			ContextManager contextManager = server.getContextManager();
-			Context context = contextManager.getContext(index);
-			context.setPath(path);
-			context.setDocBase(docBase);
-			context.setReloadable(reloadable ? "true" : "false");
-			isServerDirty = true;
-			WebModule module = new WebModule(path, docBase, null, reloadable);
-			firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
-		} catch (Exception e) {
-			Trace.trace("Error modifying web module " + index, e);
-		}
-	}
-	
-	/**
-	 * Removes a mime mapping.
-	 * @param index int
-	 */
-	public void removeMimeMapping(int index) {
-		webAppDocument.removeMimeMapping(index);
-		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
-	}
-	
-	/**
-	 * Removes a web module.
-	 * @param index int
-	 */
-	public void removeWebModule(int index) {
-		try {
-			ContextManager contextManager = server.getContextManager();
-			contextManager.removeElement("Context", index);
-			isServerDirty = true;
-			firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
-		} catch (Exception e) {
-			Trace.trace("Error removing web module " + index, e);
-		}
-	}
-	
-	public void importFromPath(IPath path, IProgressMonitor monitor) throws CoreException {
-		load(path, monitor);
-	}
-
-	public void importFromRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
-		load(runtime.getLocation().append("conf"), monitor);
-	}
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java
index a2d63f8..656136c 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32RuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32RuntimeTargetHandler.java
deleted file mode 100644
index 8559ee0..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32RuntimeTargetHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IClasspathEntry;
-
-import org.eclipse.wst.server.core.IRuntime;
-/**
- * 
- */
-public class Tomcat32RuntimeTargetHandler extends TomcatRuntimeTargetHandler {
-	public String getId() {
-		return "org.eclipse.jst.server.tomcat.runtimeTarget.v32";
-	}
-
-	public String getLabel() {
-		return TomcatPlugin.getResource("%target32runtime");
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.wst.server.target.IServerTargetDelegate#getClasspathEntries()
-	 */
-	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime) {
-		IPath installPath = runtime.getLocation();
-					
-		if (installPath == null)
-			return new IClasspathEntry[0];
-		
-		IPath path = installPath.append("lib");
-		List list = new ArrayList();
-		addLibraryEntries(list, path.toFile(), true);
-		
-		return resolveList(list);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java
index 2072415..3dc4210 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.ByteArrayInputStream;
@@ -22,26 +23,18 @@
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jst.server.tomcat.core.IMimeMapping;
+import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.xml.Factory;
 import org.eclipse.jst.server.tomcat.core.internal.xml.XMLUtil;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Server;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service;
+import org.eclipse.jst.server.tomcat.core.internal.xml.server40.*;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
 
-import org.eclipse.wst.server.core.model.IServerPort;
-import org.eclipse.wst.server.core.util.ProgressUtil;
+import org.eclipse.wst.server.core.IServerPort;
 import org.eclipse.wst.server.core.util.ServerPort;
 /**
  * Tomcat v4.0 server configuration.
@@ -67,8 +60,8 @@
 	/**
 	 * Tomcat40Configuration constructor comment.
 	 */
-	public Tomcat40Configuration() {
-		super();
+	public Tomcat40Configuration(IFolder path) {
+		super(path);
 	}
 		
 	/**
@@ -133,7 +126,9 @@
 		try {
 			int port = Integer.parseInt(server.getPort());
 			ports.add(new ServerPort("server", "Server port", port, "TCPIP"));
-		} catch (Exception e) { }
+		} catch (Exception e) {
+			// ignore
+		}
 	
 		// add connectors
 		try {
@@ -151,7 +146,9 @@
 					int port = -1;
 					try {
 						port = Integer.parseInt(connector.getPort());
-					} catch (Exception e) { }
+					} catch (Exception e) {
+						// ignore
+					}
 					if (HTTP_CONNECTOR.equals(className)) {
 						name = "HTTP Connector";
 						protocol = "HTTP";
@@ -163,7 +160,9 @@
 								name = "SSL Connector";
 								protocol = "SSL";
 							}
-						} catch (Exception e) { }
+						} catch (Exception e) {
+							// ignore
+						}
 						if ("HTTP".equals(protocol))
 							advanced = false;
 					} else if (APACHE_CONNECTOR.equals(className))
@@ -440,4 +439,200 @@
 			throw new CoreException(new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorCouldNotSaveConfiguration", new String[] {e.getLocalizedMessage()}), e));
 		}
 	}
-}
+	
+	/**
+	 * Adds a mime mapping.
+	 * @param extension java.lang.String
+	 * @param mimeType java.lang.String
+	 */
+	public void addMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.addMimeMapping(index, map);
+		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
+	}
+
+	/**
+	 * Add a web module.
+	 * @param module org.eclipse.jst.server.tomcat.WebModule
+	 */
+	public void addWebModule(int index, ITomcatWebModule module) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = (Context) host.createElement(index, "Context");
+					context.setDocBase(module.getDocumentBase());
+					context.setPath(module.getPath());
+					context.setReloadable(module.isReloadable() ? "true" : "false");
+					if (module.getMemento() != null && module.getMemento().length() > 0)
+						context.setSource(module.getMemento());
+					isServerDirty = true;
+					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error adding web module " + module.getPath(), e);
+		}
+	}
+	
+	/**
+	 * Localize the web projects in this configuration.
+	 *
+	 * @param file java.io.File
+	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
+	 */
+	public void localizeConfiguration(IPath path, TomcatServer server2, IProgressMonitor monitor) {
+		try {
+			monitor = ProgressUtil.getMonitorFor(monitor);
+			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
+			
+			Tomcat40Configuration config = new Tomcat40Configuration(null);
+			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (monitor.isCanceled())
+				return;
+	
+			if (!server2.isTestEnvironment()) {
+				//IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().createWorkingCopy();
+				//Tomcat40Configuration cfg = (Tomcat40Configuration) scwc.getAdapter(Tomcat40Configuration.class);
+				config.localizeWebModules();
+			}
+	
+			monitor.worked(20);
+	
+			if (monitor.isCanceled())
+				return;
+	
+			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (!monitor.isCanceled())
+				monitor.done();
+		} catch (Exception e) {
+			Trace.trace("Error localizing configuration", e);
+		}
+	}
+	
+	/**
+	 * Go through all of the web modules and make the document
+	 * base "local" to the configuration.
+	 */
+	protected void localizeWebModules() {
+		List modules = getWebModules();
+
+		int size = modules.size();
+		for (int i = 0; i < size; i++) {
+			WebModule module = (WebModule) modules.get(i);
+			String memento = module.getMemento();
+			if (memento != null && memento.length() > 0) {
+				// update document base to a relative ref
+				String docBase = getPathPrefix() + module.getPath();
+				if (docBase.startsWith("/") || docBase.startsWith("\\"))
+					docBase = docBase.substring(1);
+				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
+			}
+		}
+	}
+
+	/**
+	 * Change the extension of a mime mapping.
+	 * @param index int
+	 * @param newExtension java.lang.String
+	 */
+	public void modifyMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.modifyMimeMapping(index, map);
+		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
+	}
+	
+	/**
+	 * Modify the port with the given id.
+	 *
+	 * @param id java.lang.String
+	 * @param port int
+	 */
+	public void modifyServerPort(String id, int port) {
+		try {
+			if ("server".equals(id)) {
+				server.setPort(port + "");
+				isServerDirty = true;
+				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+				return;
+			}
+	
+			int i = id.indexOf("/");
+			int servNum = Integer.parseInt(id.substring(0, i));
+			int connNum = Integer.parseInt(id.substring(i + 1));
+			
+			Service service = server.getService(servNum);
+			Connector connector = service.getConnector(connNum);
+			connector.setPort(port + "");
+			isServerDirty = true;
+			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+		} catch (Exception e) {
+			Trace.trace("Error modifying server port " + id, e);
+		}
+	}
+	/**
+	 * Change a web module.
+	 * @param index int
+	 * @param docBase java.lang.String
+	 * @param path java.lang.String
+	 * @param reloadable boolean
+	 */
+	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = host.getContext(index);
+					context.setPath(path);
+					context.setDocBase(docBase);
+					context.setReloadable(reloadable ? "true" : "false");
+					isServerDirty = true;
+					WebModule module = new WebModule(path, docBase, null, reloadable);
+					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error modifying web module " + index, e);
+		}
+	}
+	
+	/**
+	 * Removes a mime mapping.
+	 * @param index int
+	 */
+	public void removeMimeMapping(int index) {
+		webAppDocument.removeMimeMapping(index);
+		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
+	}
+	
+	/**
+	 * Removes a web module.
+	 * @param index int
+	 */
+	public void removeWebModule(int index) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					host.removeElement("Context", index);
+					isServerDirty = true;
+					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error removing module ref " + index, e);
+		}
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40ConfigurationWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40ConfigurationWorkingCopy.java
deleted file mode 100644
index 999948a..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40ConfigurationWorkingCopy.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.server.tomcat.core.IMimeMapping;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
-import org.eclipse.jst.server.tomcat.core.WebModule;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.util.ProgressUtil;
-/**
- * Tomcat v4.0 server configuration.
- */
-public class Tomcat40ConfigurationWorkingCopy extends Tomcat40Configuration implements ITomcatConfigurationWorkingCopy {
-	protected IServerConfigurationWorkingCopy wc;
-
-	/**
-	 * Tomcat40Configuration constructor comment.
-	 */
-	public Tomcat40ConfigurationWorkingCopy() {
-		super();
-	}
-	
-	public void initialize(IServerConfigurationWorkingCopy wc2) {
-		this.wc = wc2;
-	}
-	
-	public void setDefaults() { }
-	
-	public void handleSave(byte id, IProgressMonitor monitor) { }
-	
-	/**
-	 * Adds a mime mapping.
-	 * @param extension java.lang.String
-	 * @param mimeType java.lang.String
-	 */
-	public void addMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.addMimeMapping(index, map);
-		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
-	}
-
-	/**
-	 * Add a web module.
-	 * @param module org.eclipse.jst.server.tomcat.WebModule
-	 */
-	public void addWebModule(int index, ITomcatWebModule module) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = (Context) host.createElement(index, "Context");
-					context.setDocBase(module.getDocumentBase());
-					context.setPath(module.getPath());
-					context.setReloadable(module.isReloadable() ? "true" : "false");
-					if (module.getMemento() != null && module.getMemento().length() > 0)
-						context.setSource(module.getMemento());
-					isServerDirty = true;
-					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error adding web module " + module.getPath(), e);
-		}
-	}
-	
-	/**
-	 * Localize the web projects in this configuration.
-	 *
-	 * @param file java.io.File
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 */
-	public void localizeConfiguration(IPath path, TomcatServer server2, IProgressMonitor monitor) {
-		try {
-			monitor = ProgressUtil.getMonitorFor(monitor);
-			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
-			
-			Tomcat40Configuration config = new Tomcat40Configuration();
-			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (monitor.isCanceled())
-				return;
-	
-			if (!server2.isTestEnvironment()) {
-				IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().getWorkingCopy();
-				((Tomcat40ConfigurationWorkingCopy) scwc.getDelegate()).localizeWebModules();
-			}
-	
-			monitor.worked(20);
-	
-			if (monitor.isCanceled())
-				return;
-	
-			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (!monitor.isCanceled())
-				monitor.done();
-		} catch (Exception e) {
-			Trace.trace("Error localizing configuration", e);
-		}
-	}
-	
-	/**
-	 * Go through all of the web modules and make the document
-	 * base "local" to the configuration.
-	 */
-	protected void localizeWebModules() {
-		List modules = getWebModules();
-
-		int size = modules.size();
-		for (int i = 0; i < size; i++) {
-			WebModule module = (WebModule) modules.get(i);
-			String memento = module.getMemento();
-			if (memento != null && memento.length() > 0) {
-				// update document base to a relative ref
-				String docBase = getPathPrefix() + module.getPath();
-				if (docBase.startsWith("/") || docBase.startsWith("\\"))
-					docBase = docBase.substring(1);
-				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
-			}
-		}
-	}
-
-	/**
-	 * Change the extension of a mime mapping.
-	 * @param index int
-	 * @param newExtension java.lang.String
-	 */
-	public void modifyMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.modifyMimeMapping(index, map);
-		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
-	}
-	
-	/**
-	 * Modify the port with the given id.
-	 *
-	 * @param id java.lang.String
-	 * @param port int
-	 */
-	public void modifyServerPort(String id, int port) {
-		try {
-			if ("server".equals(id)) {
-				server.setPort(port + "");
-				isServerDirty = true;
-				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-				return;
-			}
-	
-			int i = id.indexOf("/");
-			int servNum = Integer.parseInt(id.substring(0, i));
-			int connNum = Integer.parseInt(id.substring(i + 1));
-			
-			Service service = server.getService(servNum);
-			Connector connector = service.getConnector(connNum);
-			connector.setPort(port + "");
-			isServerDirty = true;
-			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-		} catch (Exception e) {
-			Trace.trace("Error modifying server port " + id, e);
-		}
-	}
-	/**
-	 * Change a web module.
-	 * @param index int
-	 * @param docBase java.lang.String
-	 * @param path java.lang.String
-	 * @param reloadable boolean
-	 */
-	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = host.getContext(index);
-					context.setPath(path);
-					context.setDocBase(docBase);
-					context.setReloadable(reloadable ? "true" : "false");
-					isServerDirty = true;
-					WebModule module = new WebModule(path, docBase, null, reloadable);
-					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error modifying web module " + index, e);
-		}
-	}
-	
-	/**
-	 * Removes a mime mapping.
-	 * @param index int
-	 */
-	public void removeMimeMapping(int index) {
-		webAppDocument.removeMimeMapping(index);
-		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
-	}
-	
-	/**
-	 * Removes a web module.
-	 * @param index int
-	 */
-	public void removeWebModule(int index) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					host.removeElement("Context", index);
-					isServerDirty = true;
-					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error removing module ref " + index, e);
-		}
-	}
-	
-	public void importFromPath(IPath path, IProgressMonitor monitor) throws CoreException {
-		load(path, monitor);
-	}
-
-	public void importFromRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
-		load(runtime.getLocation().append("conf"), monitor);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java
index b69a5b4..0452222 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.util.ArrayList;
 import java.util.List;
 
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40RuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40RuntimeTargetHandler.java
deleted file mode 100644
index 5adf0e6..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40RuntimeTargetHandler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IClasspathEntry;
-
-import org.eclipse.wst.server.core.IRuntime;
-/**
- * 
- */
-public class Tomcat40RuntimeTargetHandler extends TomcatRuntimeTargetHandler {
-	public String getId() {
-		return "org.eclipse.jst.server.tomcat.runtimeTarget.v40";
-	}
-
-	public String getLabel() {
-		return TomcatPlugin.getResource("%target40runtime");
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.wst.server.target.IServerTargetDelegate#getClasspathEntries()
-	 */
-	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime) {
-		IPath installPath = runtime.getLocation();
-		
-		if (installPath == null)
-			return new IClasspathEntry[0];
-		
-		IPath path = installPath.append("common");
-		List list = new ArrayList();
-		addLibraryEntries(list, path.append("lib").toFile(), true);
-		addLibraryEntries(list, path.append("endorsed").toFile(), true);
-		//addLibraryEntry(list, path.append("classes").toFile()); // no longer supported by eclipse
-		return resolveList(list);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java
index 5d26f99..1ff47c1 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.ByteArrayInputStream;
@@ -22,27 +23,18 @@
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jst.server.tomcat.core.IMimeMapping;
+import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.xml.Factory;
 import org.eclipse.jst.server.tomcat.core.internal.xml.XMLUtil;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Listener;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Server;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service;
+import org.eclipse.jst.server.tomcat.core.internal.xml.server40.*;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
 
-import org.eclipse.wst.server.core.model.IServerPort;
-import org.eclipse.wst.server.core.util.ProgressUtil;
+import org.eclipse.wst.server.core.IServerPort;
 import org.eclipse.wst.server.core.util.ServerPort;
 /**
  * Tomcat v4.1 server configuration.
@@ -69,8 +61,8 @@
 	/**
 	 * Tomcat41Configuration constructor comment.
 	 */
-	public Tomcat41Configuration() {
-		super();
+	public Tomcat41Configuration(IFolder path) {
+		super(path);
 	}
 	
 	/**
@@ -135,7 +127,9 @@
 		try {
 			int port = Integer.parseInt(server.getPort());
 			ports.add(new ServerPort("server", "Server port", port, "TCPIP"));
-		} catch (Exception e) { }
+		} catch (Exception e) {
+			// ignore
+		}
 	
 		// add connectors
 		try {
@@ -153,7 +147,9 @@
 					int port = -1;
 					try {
 						port = Integer.parseInt(connector.getPort());
-					} catch (Exception e) { }
+					} catch (Exception e) {
+						// ignore
+					}
 					if (HTTP_CONNECTOR.equals(className)) {
 						name = "HTTP Connector";
 						protocol = "HTTP";
@@ -165,7 +161,9 @@
 								name = "SSL Connector";
 								protocol = "SSL";
 							}
-						} catch (Exception e) { }
+						} catch (Exception e) {
+							// ignore
+						}
 						if ("HTTP".equals(protocol))
 							advanced = false;
 					} else if (APACHE_CONNECTOR.equals(className))
@@ -458,4 +456,199 @@
 		}
 		return false;
 	}
-}
+	
+	/**
+	 * Adds a mime mapping.
+	 * @param extension java.lang.String
+	 * @param mimeType java.lang.String
+	 */
+	public void addMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.addMimeMapping(index, map);
+		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
+	}
+
+	/**
+	 * Add a web module.
+	 * @param module org.eclipse.jst.server.tomcat.WebModule
+	 */
+	public void addWebModule(int index, ITomcatWebModule module) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = (Context) host.createElement(index, "Context");
+					context.setDocBase(module.getDocumentBase());
+					context.setPath(module.getPath());
+					context.setReloadable(module.isReloadable() ? "true" : "false");
+					if (module.getMemento() != null && module.getMemento().length() > 0)
+						context.setSource(module.getMemento());
+					isServerDirty = true;
+					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error adding web module " + module.getPath(), e);
+		}
+	}
+
+	/**
+	 * Localize the web projects in this configuration.
+	 *
+	 * @param file java.io.File
+	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
+	 */
+	public void localizeConfiguration(IPath path, TomcatServer server2, TomcatRuntime runtime, IProgressMonitor monitor) {
+		try {
+			monitor = ProgressUtil.getMonitorFor(monitor);
+			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
+			
+			Tomcat41Configuration config = new Tomcat41Configuration(null);
+			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (monitor.isCanceled())
+				return;
+	
+			if (!server2.isTestEnvironment()) {
+				//IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().createWorkingCopy();
+				//Tomcat41Configuration cfg = (Tomcat41Configuration) scwc.getAdapter(Tomcat41Configuration.class);
+				config.localizeWebModules();
+			}
+			monitor.worked(20);
+	
+			if (monitor.isCanceled())
+				return;
+	
+			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (!monitor.isCanceled())
+				monitor.done();
+		} catch (Exception e) {
+			Trace.trace("Error localizing configuration", e);
+		}
+	}
+	
+	/**
+	 * Go through all of the web modules and make the document
+	 * base "local" to the configuration.
+	 */
+	protected void localizeWebModules() {
+		List modules = getWebModules();
+
+		int size = modules.size();
+		for (int i = 0; i < size; i++) {
+			WebModule module = (WebModule) modules.get(i);
+			String memento = module.getMemento();
+			if (memento != null && memento.length() > 0) {
+				// update document base to a relative ref
+				String docBase = getPathPrefix() + module.getPath();
+				if (docBase.startsWith("/") || docBase.startsWith("\\"))
+					docBase = docBase.substring(1);
+				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
+			}
+		}
+	}
+
+	/**
+	 * Change the extension of a mime mapping.
+	 * @param index int
+	 * @param newExtension java.lang.String
+	 */
+	public void modifyMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.modifyMimeMapping(index, map);
+		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
+	}
+	
+	/**
+	 * Modify the port with the given id.
+	 *
+	 * @param id java.lang.String
+	 * @param port int
+	 */
+	public void modifyServerPort(String id, int port) {
+		try {
+			if ("server".equals(id)) {
+				server.setPort(port + "");
+				isServerDirty = true;
+				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+				return;
+			}
+	
+			int i = id.indexOf("/");
+			int servNum = Integer.parseInt(id.substring(0, i));
+			int connNum = Integer.parseInt(id.substring(i + 1));
+			
+			Service service = server.getService(servNum);
+			Connector connector = service.getConnector(connNum);
+			connector.setPort(port + "");
+			isServerDirty = true;
+			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+		} catch (Exception e) {
+			Trace.trace("Error modifying server port " + id, e);
+		}
+	}
+	/**
+	 * Change a web module.
+	 * @param index int
+	 * @param docBase java.lang.String
+	 * @param path java.lang.String
+	 * @param reloadable boolean
+	 */
+	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = host.getContext(index);
+					context.setPath(path);
+					context.setDocBase(docBase);
+					context.setReloadable(reloadable ? "true" : "false");
+					isServerDirty = true;
+					WebModule module = new WebModule(path, docBase, null, reloadable);
+					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error modifying web module " + index, e);
+		}
+	}
+
+	/**
+	 * Removes a mime mapping.
+	 * @param index int
+	 */
+	public void removeMimeMapping(int index) {
+		webAppDocument.removeMimeMapping(index);
+		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
+	}
+
+	/**
+	 * Removes a web module.
+	 * @param index int
+	 */
+	public void removeWebModule(int index) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					host.removeElement("Context", index);
+					isServerDirty = true;
+					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error removing module ref " + index, e);
+		}
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41ConfigurationWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41ConfigurationWorkingCopy.java
deleted file mode 100644
index 0c1abd6..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41ConfigurationWorkingCopy.java
+++ /dev/null
@@ -1,252 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.server.tomcat.core.IMimeMapping;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
-import org.eclipse.jst.server.tomcat.core.WebModule;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.util.ProgressUtil;
-/**
- * Tomcat v4.1 server configuration.
- */
-public class Tomcat41ConfigurationWorkingCopy extends Tomcat41Configuration implements ITomcatConfigurationWorkingCopy {
-	protected IServerConfigurationWorkingCopy wc;
-
-	/**
-	 * Tomcat41Configuration constructor comment.
-	 */
-	public Tomcat41ConfigurationWorkingCopy() {
-		super();
-	}
-	
-	public void initialize(IServerConfigurationWorkingCopy wc2) {
-		this.wc = wc2;
-	}
-	
-	public void setDefaults() { }
-	
-	public void handleSave(byte id, IProgressMonitor monitor) { }
-	
-	/**
-	 * Adds a mime mapping.
-	 * @param extension java.lang.String
-	 * @param mimeType java.lang.String
-	 */
-	public void addMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.addMimeMapping(index, map);
-		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
-	}
-
-	/**
-	 * Add a web module.
-	 * @param module org.eclipse.jst.server.tomcat.WebModule
-	 */
-	public void addWebModule(int index, ITomcatWebModule module) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = (Context) host.createElement(index, "Context");
-					context.setDocBase(module.getDocumentBase());
-					context.setPath(module.getPath());
-					context.setReloadable(module.isReloadable() ? "true" : "false");
-					if (module.getMemento() != null && module.getMemento().length() > 0)
-						context.setSource(module.getMemento());
-					isServerDirty = true;
-					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error adding web module " + module.getPath(), e);
-		}
-	}
-
-	/**
-	 * Localize the web projects in this configuration.
-	 *
-	 * @param file java.io.File
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 */
-	public void localizeConfiguration(IPath path, TomcatServer server2, TomcatRuntime runtime, IProgressMonitor monitor) {
-		try {
-			monitor = ProgressUtil.getMonitorFor(monitor);
-			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
-			
-			Tomcat41Configuration config = new Tomcat41Configuration();
-			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (monitor.isCanceled())
-				return;
-	
-			if (!server2.isTestEnvironment()) {
-				IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().getWorkingCopy();
-				((Tomcat41ConfigurationWorkingCopy) scwc.getDelegate()).localizeWebModules();
-			}
-			monitor.worked(20);
-	
-			if (monitor.isCanceled())
-				return;
-	
-			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (!monitor.isCanceled())
-				monitor.done();
-		} catch (Exception e) {
-			Trace.trace("Error localizing configuration", e);
-		}
-	}
-	
-	/**
-	 * Go through all of the web modules and make the document
-	 * base "local" to the configuration.
-	 */
-	protected void localizeWebModules() {
-		List modules = getWebModules();
-
-		int size = modules.size();
-		for (int i = 0; i < size; i++) {
-			WebModule module = (WebModule) modules.get(i);
-			String memento = module.getMemento();
-			if (memento != null && memento.length() > 0) {
-				// update document base to a relative ref
-				String docBase = getPathPrefix() + module.getPath();
-				if (docBase.startsWith("/") || docBase.startsWith("\\"))
-					docBase = docBase.substring(1);
-				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
-			}
-		}
-	}
-
-	/**
-	 * Change the extension of a mime mapping.
-	 * @param index int
-	 * @param newExtension java.lang.String
-	 */
-	public void modifyMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.modifyMimeMapping(index, map);
-		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
-	}
-	
-	/**
-	 * Modify the port with the given id.
-	 *
-	 * @param id java.lang.String
-	 * @param port int
-	 */
-	public void modifyServerPort(String id, int port) {
-		try {
-			if ("server".equals(id)) {
-				server.setPort(port + "");
-				isServerDirty = true;
-				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-				return;
-			}
-	
-			int i = id.indexOf("/");
-			int servNum = Integer.parseInt(id.substring(0, i));
-			int connNum = Integer.parseInt(id.substring(i + 1));
-			
-			Service service = server.getService(servNum);
-			Connector connector = service.getConnector(connNum);
-			connector.setPort(port + "");
-			isServerDirty = true;
-			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-		} catch (Exception e) {
-			Trace.trace("Error modifying server port " + id, e);
-		}
-	}
-	/**
-	 * Change a web module.
-	 * @param index int
-	 * @param docBase java.lang.String
-	 * @param path java.lang.String
-	 * @param reloadable boolean
-	 */
-	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = host.getContext(index);
-					context.setPath(path);
-					context.setDocBase(docBase);
-					context.setReloadable(reloadable ? "true" : "false");
-					isServerDirty = true;
-					WebModule module = new WebModule(path, docBase, null, reloadable);
-					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error modifying web module " + index, e);
-		}
-	}
-
-	/**
-	 * Removes a mime mapping.
-	 * @param index int
-	 */
-	public void removeMimeMapping(int index) {
-		webAppDocument.removeMimeMapping(index);
-		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
-	}
-
-	/**
-	 * Removes a web module.
-	 * @param index int
-	 */
-	public void removeWebModule(int index) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					host.removeElement("Context", index);
-					isServerDirty = true;
-					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error removing module ref " + index, e);
-		}
-	}
-	
-	public void importFromPath(IPath path, IProgressMonitor monitor) throws CoreException {
-		load(path, monitor);
-	}
-
-	public void importFromRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
-		load(runtime.getLocation().append("conf"), monitor);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java
index 6efc9bf..599ba88 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.util.ArrayList;
 import java.util.List;
 
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41RuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41RuntimeTargetHandler.java
deleted file mode 100644
index d96cb51..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41RuntimeTargetHandler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IClasspathEntry;
-
-import org.eclipse.wst.server.core.IRuntime;
-/**
- * 
- */
-public class Tomcat41RuntimeTargetHandler extends TomcatRuntimeTargetHandler {
-	public String getId() {
-		return "org.eclipse.jst.server.tomcat.runtimeTarget.v41";
-	}
-
-	public String getLabel() {
-		return TomcatPlugin.getResource("%target41runtime");
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.wst.server.target.IServerTargetDelegate#getClasspathEntries()
-	 */
-	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime) {
-		IPath installPath = runtime.getLocation();
-		
-		if (installPath == null)
-			return new IClasspathEntry[0];
-		
-		IPath path = installPath.append("common");
-		List list = new ArrayList();
-		addLibraryEntries(list, path.append("lib").toFile(), true);
-		addLibraryEntries(list, path.append("endorsed").toFile(), true);
-		//addLibraryEntry(list, path.append("classes").toFile()); // no longer supported by eclipse
-		return resolveList(list);
-	}
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java
index 0f0103b..bbe71a9 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.*;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -17,6 +18,8 @@
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.runtime.*;
+import org.eclipse.jst.server.tomcat.core.IMimeMapping;
+import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.xml.Factory;
 import org.eclipse.jst.server.tomcat.core.internal.xml.XMLUtil;
@@ -24,8 +27,7 @@
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 
-import org.eclipse.wst.server.core.model.IServerPort;
-import org.eclipse.wst.server.core.util.ProgressUtil;
+import org.eclipse.wst.server.core.IServerPort;
 import org.eclipse.wst.server.core.util.ServerPort;
 /**
  * Tomcat v5.0 server configuration.
@@ -46,8 +48,8 @@
 	/**
 	 * Tomcat50Configuration constructor comment.
 	 */
-	public Tomcat50Configuration() {
-		super();
+	public Tomcat50Configuration(IFolder path) {
+		super(path);
 	}
 	
 	/**
@@ -112,7 +114,9 @@
 		try {
 			int port = Integer.parseInt(server.getPort());
 			ports.add(new ServerPort("server", "Server port", port, "TCPIP"));
-		} catch (Exception e) { }
+		} catch (Exception e) {
+			// ignore
+		}
 	
 		// add connectors
 		try {
@@ -129,7 +133,9 @@
 					int port = -1;
 					try {
 						port = Integer.parseInt(connector.getPort());
-					} catch (Exception e) { }
+					} catch (Exception e) {
+						// ignore
+					}
 					String protocol = connector.getProtocol();
 					if (protocol != null && protocol.length() > 0) {
 						name = protocol;
@@ -430,4 +436,199 @@
 		}
 		return false;
 	}
-}
+	
+	/**
+	 * Adds a mime mapping.
+	 * @param extension java.lang.String
+	 * @param mimeType java.lang.String
+	 */
+	public void addMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.addMimeMapping(index, map);
+		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
+	}
+
+	/**
+	 * Add a web module.
+	 * @param module org.eclipse.jst.server.tomcat.WebModule
+	 */
+	public void addWebModule(int index, ITomcatWebModule module) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = (Context) host.createElement(index, "Context");
+					context.setDocBase(module.getDocumentBase());
+					context.setPath(module.getPath());
+					context.setReloadable(module.isReloadable() ? "true" : "false");
+					if (module.getMemento() != null && module.getMemento().length() > 0)
+						context.setSource(module.getMemento());
+					isServerDirty = true;
+					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error adding web module " + module.getPath(), e);
+		}
+	}
+
+	/**
+	 * Localize the web projects in this configuration.
+	 *
+	 * @param file java.io.File
+	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
+	 */
+	public void localizeConfiguration(IPath path, TomcatServer server2, TomcatRuntime runtime, IProgressMonitor monitor) {
+		try {
+			monitor = ProgressUtil.getMonitorFor(monitor);
+			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
+			
+			Tomcat50Configuration config = new Tomcat50Configuration(null);
+			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (monitor.isCanceled())
+				return;
+	
+			if (!server2.isTestEnvironment()) {
+				//IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().createWorkingCopy();
+				//Tomcat50Configuration cfg = (Tomcat50Configuration) scwc.getAdapter(Tomcat50Configuration.class);
+				config.localizeWebModules();
+			}
+			monitor.worked(20);
+	
+			if (monitor.isCanceled())
+				return;
+	
+			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (!monitor.isCanceled())
+				monitor.done();
+		} catch (Exception e) {
+			Trace.trace("Error localizing configuration", e);
+		}
+	}
+	
+	/**
+	 * Go through all of the web modules and make the document
+	 * base "local" to the configuration.
+	 */
+	protected void localizeWebModules() {
+		List modules = getWebModules();
+
+		int size = modules.size();
+		for (int i = 0; i < size; i++) {
+			WebModule module = (WebModule) modules.get(i);
+			String memento = module.getMemento();
+			if (memento != null && memento.length() > 0) {
+				// update document base to a relative ref
+				String docBase = getPathPrefix() + module.getPath();
+				if (docBase.startsWith("/") || docBase.startsWith("\\"))
+					docBase = docBase.substring(1);
+				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
+			}
+		}
+	}
+
+	/**
+	 * Change the extension of a mime mapping.
+	 * @param index int
+	 * @param newExtension java.lang.String
+	 */
+	public void modifyMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.modifyMimeMapping(index, map);
+		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
+	}
+	
+	/**
+	 * Modify the port with the given id.
+	 *
+	 * @param id java.lang.String
+	 * @param port int
+	 */
+	public void modifyServerPort(String id, int port) {
+		try {
+			if ("server".equals(id)) {
+				server.setPort(port + "");
+				isServerDirty = true;
+				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+				return;
+			}
+	
+			int i = id.indexOf("/");
+			int servNum = Integer.parseInt(id.substring(0, i));
+			int connNum = Integer.parseInt(id.substring(i + 1));
+			
+			Service service = server.getService(servNum);
+			Connector connector = service.getConnector(connNum);
+			connector.setPort(port + "");
+			isServerDirty = true;
+			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+		} catch (Exception e) {
+			Trace.trace("Error modifying server port " + id, e);
+		}
+	}
+	/**
+	 * Change a web module.
+	 * @param index int
+	 * @param docBase java.lang.String
+	 * @param path java.lang.String
+	 * @param reloadable boolean
+	 */
+	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = host.getContext(index);
+					context.setPath(path);
+					context.setDocBase(docBase);
+					context.setReloadable(reloadable ? "true" : "false");
+					isServerDirty = true;
+					WebModule module = new WebModule(path, docBase, null, reloadable);
+					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error modifying web module " + index, e);
+		}
+	}
+
+	/**
+	 * Removes a mime mapping.
+	 * @param index int
+	 */
+	public void removeMimeMapping(int index) {
+		webAppDocument.removeMimeMapping(index);
+		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
+	}
+
+	/**
+	 * Removes a web module.
+	 * @param index int
+	 */
+	public void removeWebModule(int index) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					host.removeElement("Context", index);
+					isServerDirty = true;
+					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error removing module ref " + index, e);
+		}
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50ConfigurationWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50ConfigurationWorkingCopy.java
deleted file mode 100644
index cc50521..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50ConfigurationWorkingCopy.java
+++ /dev/null
@@ -1,252 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.server.tomcat.core.IMimeMapping;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
-import org.eclipse.jst.server.tomcat.core.WebModule;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.util.ProgressUtil;
-/**
- * Tomcat v4.1 server configuration.
- */
-public class Tomcat50ConfigurationWorkingCopy extends Tomcat50Configuration implements ITomcatConfigurationWorkingCopy {
-	protected IServerConfigurationWorkingCopy wc;
-
-	/**
-	 * Tomcat50Configuration constructor comment.
-	 */
-	public Tomcat50ConfigurationWorkingCopy() {
-		super();
-	}
-	
-	public void initialize(IServerConfigurationWorkingCopy wc2) {
-		this.wc = wc2;
-	}
-	
-	public void setDefaults() { }
-	
-	public void handleSave(byte id, IProgressMonitor monitor) { }
-	
-	/**
-	 * Adds a mime mapping.
-	 * @param extension java.lang.String
-	 * @param mimeType java.lang.String
-	 */
-	public void addMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.addMimeMapping(index, map);
-		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
-	}
-
-	/**
-	 * Add a web module.
-	 * @param module org.eclipse.jst.server.tomcat.WebModule
-	 */
-	public void addWebModule(int index, ITomcatWebModule module) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = (Context) host.createElement(index, "Context");
-					context.setDocBase(module.getDocumentBase());
-					context.setPath(module.getPath());
-					context.setReloadable(module.isReloadable() ? "true" : "false");
-					if (module.getMemento() != null && module.getMemento().length() > 0)
-						context.setSource(module.getMemento());
-					isServerDirty = true;
-					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error adding web module " + module.getPath(), e);
-		}
-	}
-
-	/**
-	 * Localize the web projects in this configuration.
-	 *
-	 * @param file java.io.File
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 */
-	public void localizeConfiguration(IPath path, TomcatServer server2, TomcatRuntime runtime, IProgressMonitor monitor) {
-		try {
-			monitor = ProgressUtil.getMonitorFor(monitor);
-			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
-			
-			Tomcat50Configuration config = new Tomcat50Configuration();
-			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (monitor.isCanceled())
-				return;
-	
-			if (!server2.isTestEnvironment()) {
-				IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().getWorkingCopy();
-				((Tomcat50ConfigurationWorkingCopy) scwc.getDelegate()).localizeWebModules();
-			}
-			monitor.worked(20);
-	
-			if (monitor.isCanceled())
-				return;
-	
-			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (!monitor.isCanceled())
-				monitor.done();
-		} catch (Exception e) {
-			Trace.trace("Error localizing configuration", e);
-		}
-	}
-	
-	/**
-	 * Go through all of the web modules and make the document
-	 * base "local" to the configuration.
-	 */
-	protected void localizeWebModules() {
-		List modules = getWebModules();
-
-		int size = modules.size();
-		for (int i = 0; i < size; i++) {
-			WebModule module = (WebModule) modules.get(i);
-			String memento = module.getMemento();
-			if (memento != null && memento.length() > 0) {
-				// update document base to a relative ref
-				String docBase = getPathPrefix() + module.getPath();
-				if (docBase.startsWith("/") || docBase.startsWith("\\"))
-					docBase = docBase.substring(1);
-				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
-			}
-		}
-	}
-
-	/**
-	 * Change the extension of a mime mapping.
-	 * @param index int
-	 * @param newExtension java.lang.String
-	 */
-	public void modifyMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.modifyMimeMapping(index, map);
-		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
-	}
-	
-	/**
-	 * Modify the port with the given id.
-	 *
-	 * @param id java.lang.String
-	 * @param port int
-	 */
-	public void modifyServerPort(String id, int port) {
-		try {
-			if ("server".equals(id)) {
-				server.setPort(port + "");
-				isServerDirty = true;
-				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-				return;
-			}
-	
-			int i = id.indexOf("/");
-			int servNum = Integer.parseInt(id.substring(0, i));
-			int connNum = Integer.parseInt(id.substring(i + 1));
-			
-			Service service = server.getService(servNum);
-			Connector connector = service.getConnector(connNum);
-			connector.setPort(port + "");
-			isServerDirty = true;
-			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-		} catch (Exception e) {
-			Trace.trace("Error modifying server port " + id, e);
-		}
-	}
-	/**
-	 * Change a web module.
-	 * @param index int
-	 * @param docBase java.lang.String
-	 * @param path java.lang.String
-	 * @param reloadable boolean
-	 */
-	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = host.getContext(index);
-					context.setPath(path);
-					context.setDocBase(docBase);
-					context.setReloadable(reloadable ? "true" : "false");
-					isServerDirty = true;
-					WebModule module = new WebModule(path, docBase, null, reloadable);
-					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error modifying web module " + index, e);
-		}
-	}
-
-	/**
-	 * Removes a mime mapping.
-	 * @param index int
-	 */
-	public void removeMimeMapping(int index) {
-		webAppDocument.removeMimeMapping(index);
-		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
-	}
-
-	/**
-	 * Removes a web module.
-	 * @param index int
-	 */
-	public void removeWebModule(int index) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					host.removeElement("Context", index);
-					isServerDirty = true;
-					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error removing module ref " + index, e);
-		}
-	}
-	
-	public void importFromPath(IPath path, IProgressMonitor monitor) throws CoreException {
-		load(path, monitor);
-	}
-
-	public void importFromRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
-		load(runtime.getLocation().append("conf"), monitor);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java
index 9371e9a..c1d8f30 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.util.ArrayList;
 import java.util.List;
 
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50RuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50RuntimeTargetHandler.java
deleted file mode 100644
index c514873..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50RuntimeTargetHandler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IClasspathEntry;
-
-import org.eclipse.wst.server.core.IRuntime;
-/**
- * 
- */
-public class Tomcat50RuntimeTargetHandler extends TomcatRuntimeTargetHandler {
-	public String getId() {
-		return "org.eclipse.jst.server.tomcat.runtimeTarget.v50";
-	}
-
-	public String getLabel() {
-		return TomcatPlugin.getResource("%target50runtime");
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.wst.server.target.IServerTargetDelegate#getClasspathEntries()
-	 */
-	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime) {
-		IPath installPath = runtime.getLocation();
-		
-		if (installPath == null)
-			return new IClasspathEntry[0];
-		
-		IPath path = installPath.append("common");
-		List list = new ArrayList();
-		addLibraryEntries(list, path.append("lib").toFile(), true);
-		addLibraryEntries(list, path.append("endorsed").toFile(), true);
-		// addLibraryEntry(list, path.append("classes").toFile()); // no longer supported by eclipse
-		return resolveList(list);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java
index 2c3d2c0..15be680 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,39 +8,26 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
+package org.eclipse.jst.server.tomcat.core.internal;
+
+import java.io.*;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jst.server.tomcat.core.IMimeMapping;
+import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.xml.Factory;
 import org.eclipse.jst.server.tomcat.core.internal.xml.XMLUtil;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Listener;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Server;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service;
+import org.eclipse.jst.server.tomcat.core.internal.xml.server40.*;
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 
-import org.eclipse.wst.server.core.model.IServerPort;
-import org.eclipse.wst.server.core.util.ProgressUtil;
+import org.eclipse.wst.server.core.IServerPort;
 import org.eclipse.wst.server.core.util.ServerPort;
 /**
  * Tomcat v5.5 server configuration.
@@ -62,8 +48,8 @@
 	/**
 	 * Tomcat55Configuration constructor comment.
 	 */
-	public Tomcat55Configuration() {
-		super();
+	public Tomcat55Configuration(IFolder path) {
+		super(path);
 	}
 	
 	/**
@@ -128,7 +114,9 @@
 		try {
 			int port = Integer.parseInt(server.getPort());
 			ports.add(new ServerPort("server", "Server port", port, "TCPIP"));
-		} catch (Exception e) { }
+		} catch (Exception e) {
+			// ignore
+		}
 	
 		// add connectors
 		try {
@@ -145,7 +133,9 @@
 					int port = -1;
 					try {
 						port = Integer.parseInt(connector.getPort());
-					} catch (Exception e) { }
+					} catch (Exception e) {
+						// ignore
+					}
 					String protocol = connector.getProtocol();
 					if (protocol != null && protocol.length() > 0) {
 						name = protocol;
@@ -446,4 +436,199 @@
 		}
 		return false;
 	}
-}
+	
+	/**
+	 * Adds a mime mapping.
+	 * @param extension java.lang.String
+	 * @param mimeType java.lang.String
+	 */
+	public void addMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.addMimeMapping(index, map);
+		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
+	}
+
+	/**
+	 * Add a web module.
+	 * @param module org.eclipse.jst.server.tomcat.WebModule
+	 */
+	public void addWebModule(int index, ITomcatWebModule module) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = (Context) host.createElement(index, "Context");
+					context.setDocBase(module.getDocumentBase());
+					context.setPath(module.getPath());
+					context.setReloadable(module.isReloadable() ? "true" : "false");
+					if (module.getMemento() != null && module.getMemento().length() > 0)
+						context.setSource(module.getMemento());
+					isServerDirty = true;
+					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error adding web module " + module.getPath(), e);
+		}
+	}
+
+	/**
+	 * Localize the web projects in this configuration.
+	 *
+	 * @param file java.io.File
+	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
+	 */
+	public void localizeConfiguration(IPath path, TomcatServer server2, TomcatRuntime runtime, IProgressMonitor monitor) {
+		try {
+			monitor = ProgressUtil.getMonitorFor(monitor);
+			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
+			
+			Tomcat55Configuration config = new Tomcat55Configuration(null);
+			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (monitor.isCanceled())
+				return;
+	
+			if (!server2.isTestEnvironment()) {
+				//IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().createWorkingCopy();
+				//Tomcat55Configuration cfg = (Tomcat55Configuration) scwc.getAdapter(Tomcat55Configuration.class);
+				config.localizeWebModules();
+			}
+			monitor.worked(20);
+	
+			if (monitor.isCanceled())
+				return;
+	
+			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
+	
+			if (!monitor.isCanceled())
+				monitor.done();
+		} catch (Exception e) {
+			Trace.trace("Error localizing configuration", e);
+		}
+	}
+	
+	/**
+	 * Go through all of the web modules and make the document
+	 * base "local" to the configuration.
+	 */
+	protected void localizeWebModules() {
+		List modules = getWebModules();
+
+		int size = modules.size();
+		for (int i = 0; i < size; i++) {
+			WebModule module = (WebModule) modules.get(i);
+			String memento = module.getMemento();
+			if (memento != null && memento.length() > 0) {
+				// update document base to a relative ref
+				String docBase = getPathPrefix() + module.getPath();
+				if (docBase.startsWith("/") || docBase.startsWith("\\"))
+					docBase = docBase.substring(1);
+				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
+			}
+		}
+	}
+
+	/**
+	 * Change the extension of a mime mapping.
+	 * @param index int
+	 * @param newExtension java.lang.String
+	 */
+	public void modifyMimeMapping(int index, IMimeMapping map) {
+		webAppDocument.modifyMimeMapping(index, map);
+		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
+	}
+	
+	/**
+	 * Modify the port with the given id.
+	 *
+	 * @param id java.lang.String
+	 * @param port int
+	 */
+	public void modifyServerPort(String id, int port) {
+		try {
+			if ("server".equals(id)) {
+				server.setPort(port + "");
+				isServerDirty = true;
+				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+				return;
+			}
+	
+			int i = id.indexOf("/");
+			int servNum = Integer.parseInt(id.substring(0, i));
+			int connNum = Integer.parseInt(id.substring(i + 1));
+			
+			Service service = server.getService(servNum);
+			Connector connector = service.getConnector(connNum);
+			connector.setPort(port + "");
+			isServerDirty = true;
+			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
+		} catch (Exception e) {
+			Trace.trace("Error modifying server port " + id, e);
+		}
+	}
+	/**
+	 * Change a web module.
+	 * @param index int
+	 * @param docBase java.lang.String
+	 * @param path java.lang.String
+	 * @param reloadable boolean
+	 */
+	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					Context context = host.getContext(index);
+					context.setPath(path);
+					context.setDocBase(docBase);
+					context.setReloadable(reloadable ? "true" : "false");
+					isServerDirty = true;
+					WebModule module = new WebModule(path, docBase, null, reloadable);
+					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error modifying web module " + index, e);
+		}
+	}
+
+	/**
+	 * Removes a mime mapping.
+	 * @param index int
+	 */
+	public void removeMimeMapping(int index) {
+		webAppDocument.removeMimeMapping(index);
+		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
+	}
+
+	/**
+	 * Removes a web module.
+	 * @param index int
+	 */
+	public void removeWebModule(int index) {
+		try {
+			int size = server.getServiceCount();
+			for (int i = 0; i < size; i++) {
+				Service service = server.getService(i);
+				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
+					Engine engine = service.getEngine();
+					Host host = engine.getHost();
+					host.removeElement("Context", index);
+					isServerDirty = true;
+					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
+					return;
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error removing module ref " + index, e);
+		}
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55ConfigurationWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55ConfigurationWorkingCopy.java
deleted file mode 100644
index df1c811..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55ConfigurationWorkingCopy.java
+++ /dev/null
@@ -1,252 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.server.tomcat.core.IMimeMapping;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
-import org.eclipse.jst.server.tomcat.core.WebModule;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Connector;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Engine;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Host;
-import org.eclipse.jst.server.tomcat.core.internal.xml.server40.Service;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.util.ProgressUtil;
-/**
- * Tomcat v5.5 server configuration.
- */
-public class Tomcat55ConfigurationWorkingCopy extends Tomcat55Configuration implements ITomcatConfigurationWorkingCopy {
-	protected IServerConfigurationWorkingCopy wc;
-
-	/**
-	 * Tomcat55Configuration constructor comment.
-	 */
-	public Tomcat55ConfigurationWorkingCopy() {
-		super();
-	}
-	
-	public void initialize(IServerConfigurationWorkingCopy wc2) {
-		this.wc = wc2;
-	}
-	
-	public void setDefaults() { }
-	
-	public void handleSave(byte id, IProgressMonitor monitor) { }
-	
-	/**
-	 * Adds a mime mapping.
-	 * @param extension java.lang.String
-	 * @param mimeType java.lang.String
-	 */
-	public void addMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.addMimeMapping(index, map);
-		firePropertyChangeEvent(ADD_MAPPING_PROPERTY, new Integer(index), map);
-	}
-
-	/**
-	 * Add a web module.
-	 * @param module org.eclipse.jst.server.tomcat.WebModule
-	 */
-	public void addWebModule(int index, ITomcatWebModule module) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = (Context) host.createElement(index, "Context");
-					context.setDocBase(module.getDocumentBase());
-					context.setPath(module.getPath());
-					context.setReloadable(module.isReloadable() ? "true" : "false");
-					if (module.getMemento() != null && module.getMemento().length() > 0)
-						context.setSource(module.getMemento());
-					isServerDirty = true;
-					firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error adding web module " + module.getPath(), e);
-		}
-	}
-
-	/**
-	 * Localize the web projects in this configuration.
-	 *
-	 * @param file java.io.File
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 */
-	public void localizeConfiguration(IPath path, TomcatServer server2, TomcatRuntime runtime, IProgressMonitor monitor) {
-		try {
-			monitor = ProgressUtil.getMonitorFor(monitor);
-			monitor.beginTask(TomcatPlugin.getResource("%updatingConfigurationTask"), 100);
-			
-			Tomcat55Configuration config = new Tomcat55Configuration();
-			config.load(path, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (monitor.isCanceled())
-				return;
-	
-			if (!server2.isTestEnvironment()) {
-				IServerConfigurationWorkingCopy scwc = config.getServerConfiguration().getWorkingCopy();
-				((Tomcat55ConfigurationWorkingCopy) scwc.getDelegate()).localizeWebModules();
-			}
-			monitor.worked(20);
-	
-			if (monitor.isCanceled())
-				return;
-	
-			config.save(path, false, ProgressUtil.getSubMonitorFor(monitor, 40));
-	
-			if (!monitor.isCanceled())
-				monitor.done();
-		} catch (Exception e) {
-			Trace.trace("Error localizing configuration", e);
-		}
-	}
-	
-	/**
-	 * Go through all of the web modules and make the document
-	 * base "local" to the configuration.
-	 */
-	protected void localizeWebModules() {
-		List modules = getWebModules();
-
-		int size = modules.size();
-		for (int i = 0; i < size; i++) {
-			WebModule module = (WebModule) modules.get(i);
-			String memento = module.getMemento();
-			if (memento != null && memento.length() > 0) {
-				// update document base to a relative ref
-				String docBase = getPathPrefix() + module.getPath();
-				if (docBase.startsWith("/") || docBase.startsWith("\\"))
-					docBase = docBase.substring(1);
-				modifyWebModule(i, docBase, module.getPath(), module.isReloadable());
-			}
-		}
-	}
-
-	/**
-	 * Change the extension of a mime mapping.
-	 * @param index int
-	 * @param newExtension java.lang.String
-	 */
-	public void modifyMimeMapping(int index, IMimeMapping map) {
-		webAppDocument.modifyMimeMapping(index, map);
-		firePropertyChangeEvent(MODIFY_MAPPING_PROPERTY, new Integer(index), map);
-	}
-	
-	/**
-	 * Modify the port with the given id.
-	 *
-	 * @param id java.lang.String
-	 * @param port int
-	 */
-	public void modifyServerPort(String id, int port) {
-		try {
-			if ("server".equals(id)) {
-				server.setPort(port + "");
-				isServerDirty = true;
-				firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-				return;
-			}
-	
-			int i = id.indexOf("/");
-			int servNum = Integer.parseInt(id.substring(0, i));
-			int connNum = Integer.parseInt(id.substring(i + 1));
-			
-			Service service = server.getService(servNum);
-			Connector connector = service.getConnector(connNum);
-			connector.setPort(port + "");
-			isServerDirty = true;
-			firePropertyChangeEvent(MODIFY_PORT_PROPERTY, id, new Integer(port));
-		} catch (Exception e) {
-			Trace.trace("Error modifying server port " + id, e);
-		}
-	}
-	/**
-	 * Change a web module.
-	 * @param index int
-	 * @param docBase java.lang.String
-	 * @param path java.lang.String
-	 * @param reloadable boolean
-	 */
-	public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					Context context = host.getContext(index);
-					context.setPath(path);
-					context.setDocBase(docBase);
-					context.setReloadable(reloadable ? "true" : "false");
-					isServerDirty = true;
-					WebModule module = new WebModule(path, docBase, null, reloadable);
-					firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error modifying web module " + index, e);
-		}
-	}
-
-	/**
-	 * Removes a mime mapping.
-	 * @param index int
-	 */
-	public void removeMimeMapping(int index) {
-		webAppDocument.removeMimeMapping(index);
-		firePropertyChangeEvent(REMOVE_MAPPING_PROPERTY, null, new Integer(index));
-	}
-
-	/**
-	 * Removes a web module.
-	 * @param index int
-	 */
-	public void removeWebModule(int index) {
-		try {
-			int size = server.getServiceCount();
-			for (int i = 0; i < size; i++) {
-				Service service = server.getService(i);
-				if (service.getName().equalsIgnoreCase(DEFAULT_SERVICE)) {
-					Engine engine = service.getEngine();
-					Host host = engine.getHost();
-					host.removeElement("Context", index);
-					isServerDirty = true;
-					firePropertyChangeEvent(REMOVE_WEB_MODULE_PROPERTY, null, new Integer(index));
-					return;
-				}
-			}
-		} catch (Exception e) {
-			Trace.trace("Error removing module ref " + index, e);
-		}
-	}
-	
-	public void importFromPath(IPath path, IProgressMonitor monitor) throws CoreException {
-		load(path, monitor);
-	}
-
-	public void importFromRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
-		load(runtime.getLocation().append("conf"), monitor);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Handler.java
index 891f976..bfcba2a 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Handler.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -40,4 +41,4 @@
 		
 		return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorSpec55"), null);
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55RuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55RuntimeTargetHandler.java
deleted file mode 100644
index cae2d19..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55RuntimeTargetHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-/**
- * 
- */
-public class Tomcat55RuntimeTargetHandler extends Tomcat50RuntimeTargetHandler {
-	public String getId() {
-		return "org.eclipse.jst.server.tomcat.runtimeTarget.v55";
-	}
-
-	public String getLabel() {
-		return TomcatPlugin.getResource("%target55runtime");
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfiguration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfiguration.java
index 4a18a1d..32fd827 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfiguration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfiguration.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,31 +8,34 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 import java.io.File;
 import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
 import org.eclipse.jst.server.j2ee.IWebModule;
 import org.eclipse.jst.server.tomcat.core.ITomcatConfiguration;
+import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
+import org.eclipse.jst.server.tomcat.core.ITomcatWebModule;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 
-import org.eclipse.wst.server.core.model.IServerPort;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServerPort;
+import org.eclipse.wst.server.core.internal.Trace;
 import org.eclipse.wst.server.core.util.FileUtil;
-import org.eclipse.wst.server.core.util.ProgressUtil;
-import org.eclipse.wst.server.core.util.ServerConfigurationDelegate;
 /**
  * Generic Tomcat server configuration.
  */
-public abstract class TomcatConfiguration extends ServerConfigurationDelegate implements ITomcatConfiguration {
+public abstract class TomcatConfiguration implements ITomcatConfiguration, ITomcatConfigurationWorkingCopy {
 	public static final String NAME_PROPERTY = "name";
 	public static final String PORT_PROPERTY = "port";
 	public static final String MODIFY_PORT_PROPERTY = "modifyPort";
@@ -44,12 +46,27 @@
 	public static final String MODIFY_WEB_MODULE_PROPERTY = "modifyWebModule";
 	public static final String ADD_WEB_MODULE_PROPERTY = "addWebModule";
 	public static final String REMOVE_WEB_MODULE_PROPERTY = "removeWebModule";
+	
+	protected IFolder configPath;
+
+	// property change listeners
+	private transient List propertyListeners;
 
 	/**
 	 * TomcatConfiguration constructor comment.
 	 */
-	public TomcatConfiguration() {
+	public TomcatConfiguration(IFolder path) {
 		super();
+		this.configPath = path;
+		/*try {
+			load(configPath, new NullProgressMonitor());
+		} catch (Exception e) {
+			// ignore
+		}*/
+	}
+	
+	protected IFolder getFolder() {
+		return configPath;
 	}
 
 	/**
@@ -76,14 +93,15 @@
 			
 			confDir = confDir.append("conf");
 	
-			IFolder folder = configuration.getConfigurationDataFolder();
+			/*IServerConfiguration config = getServerConfiguration();
+			IFolder folder = config.getConfigurationDataFolder();
 			if (folder != null)
 				backupFolder(folder, confDir, backup, ms, monitor);
 			else {
-				IPath path = configuration.getConfigurationDataPath();
-				backupPath(path, confDir, backup, ms, monitor);
-			}
-			
+				IPath path = config.getConfigurationDataPath();
+				backupPath(configPath, confDir, backup, ms, monitor);*/
+				backupFolder(getFolder(), confDir, backup, ms, monitor);
+			//}
 		} catch (Exception e) {
 			Trace.trace("backupAndPublish() error", e);
 			IStatus s = new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorPublishConfiguration", new String[] {e.getLocalizedMessage()}), e);
@@ -190,12 +208,13 @@
 	 * @return java.lang.String
 	 * @param module IWebModule
 	 */
-	protected String getWebModuleURL(IWebModule webModule) {
+	protected String getWebModuleURL(IModule webModule) {
 		WebModule module = getWebModule(webModule);
 		if (module != null)
 			return module.getPath();
 		
-		return webModule.getContextRoot();
+		IWebModule webModule2 = (IWebModule) webModule.getAdapter(IWebModule.class);
+		return webModule2.getContextRoot();
 	}
 
 	/**
@@ -204,11 +223,11 @@
 	 * @return java.lang.String
 	 * @param project org.eclipse.core.resources.IProject
 	 */
-	protected WebModule getWebModule(IWebModule webModule) {
+	protected WebModule getWebModule(IModule webModule) {
 		if (webModule == null)
 			return null;
 	
-		String memento = webModule.getFactoryId() + ":" + webModule.getId();
+		String memento = webModule.getId();
 	
 		List modules = getWebModules();
 		int size = modules.size();
@@ -234,13 +253,68 @@
 	 * @param forceSave boolean
 	 * @exception java.io.IOException
 	 */
-	protected abstract void save(IPath path, boolean forceSave, IProgressMonitor monitor) throws CoreException;
+	//protected abstract void save(IPath path, boolean forceSave, IProgressMonitor monitor) throws CoreException;
+	
+	protected abstract void save(IFolder folder, IProgressMonitor monitor) throws CoreException;
 	
 	protected void firePropertyChangeEvent(String propertyName, Object oldValue, Object newValue) {
-		configuration.getWorkingCopy().firePropertyChangeEvent(propertyName, oldValue, newValue);
+		if (propertyListeners == null)
+			return;
+	
+		PropertyChangeEvent event = new PropertyChangeEvent(this, propertyName, oldValue, newValue);
+		try {
+			Iterator iterator = propertyListeners.iterator();
+			while (iterator.hasNext()) {
+				try {
+					PropertyChangeListener listener = (PropertyChangeListener) iterator.next();
+					listener.propertyChange(event);
+				} catch (Exception e) {
+					Trace.trace("Error firing property change event", e);
+				}
+			}
+		} catch (Exception e) {
+			Trace.trace("Error in property event", e);
+		}
 	}
 
 	/**
+	 * Adds a property change listener to this server.
+	 *
+	 * @param listener java.beans.PropertyChangeListener
+	 */
+	public void addPropertyChangeListener(PropertyChangeListener listener) {
+		if (propertyListeners == null)
+			propertyListeners = new ArrayList();
+		propertyListeners.add(listener);
+	}
+
+	/**
+	 * Removes a property change listener from this server.
+	 *
+	 * @param listener java.beans.PropertyChangeListener
+	 */
+	public void removePropertyChangeListener(PropertyChangeListener listener) {
+		if (propertyListeners != null)
+			propertyListeners.remove(listener);
+	}
+
+	/*public void importFromPath(IPath path, IProgressMonitor monitor) throws CoreException {
+		load(path, monitor);
+	}
+
+	public void importFromRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
+		load(runtime.getLocation().append("conf"), monitor);
+	}*/
+	
+	protected abstract void load(IPath path, IProgressMonitor monitor) throws CoreException;
+	
+	protected abstract void load(IFolder folder, IProgressMonitor monitor) throws CoreException;
+	
+	public abstract void addWebModule(int index, ITomcatWebModule module);
+	
+	public abstract void removeWebModule(int index);
+
+	/**
 	 * Return a string representation of this object.
 	 * @return java.lang.String
 	 */
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfigurationUtil.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfigurationUtil.java
index d0b81dd..1f0f7f3 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfigurationUtil.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfigurationUtil.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java
index aa25486..2044ff2 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.File;
 import java.util.Map;
 
@@ -32,14 +33,14 @@
 	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
 		String serverId = configuration.getAttribute(IServer.ATTR_SERVER_ID, (String) null);
 
-		IServer server = ServerCore.getResourceManager().getServer(serverId);
+		IServer server = ServerCore.findServer(serverId);
 		if (server == null) {
 			Trace.trace(Trace.FINEST, "Launch configuration could not find server");
 			// throw CoreException();
 			return;
 		}
 
-		TomcatServer tomcatServer = (TomcatServer) server.getDelegate();
+		TomcatServerBehaviour tomcatServer = (TomcatServerBehaviour) server.getAdapter(TomcatServerBehaviour.class);
 		tomcatServer.setupLaunch(launch, mode, monitor);
 		
 		String mainTypeName = tomcatServer.getRuntimeClass();
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchableAdapterDelegate.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchableAdapterDelegate.java
index 3407b18..4d6edf5 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchableAdapterDelegate.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchableAdapterDelegate.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,37 +8,37 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.net.URL;
 
 import org.eclipse.jst.server.j2ee.IWebModule;
 import org.eclipse.jst.server.j2ee.Servlet;
 import org.eclipse.jst.server.j2ee.WebResource;
+import org.eclipse.wst.server.core.ILaunchable;
+import org.eclipse.wst.server.core.IModuleArtifact;
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.model.*;
 import org.eclipse.wst.server.core.util.HttpLaunchable;
-import org.eclipse.wst.server.core.util.NullLaunchable;
-import org.eclipse.wst.server.core.util.NullModuleObject;
 /**
  * Launchable adapter delegate for Web resources in Tomcat.
  */
-public class TomcatLaunchableAdapterDelegate implements ILaunchableAdapterDelegate {
+public class TomcatLaunchableAdapterDelegate extends LaunchableAdapterDelegate {
 	/*
-	 * @see ILaunchableAdapterDelegate#getLaunchable(IServer, IModuleObject)
+	 * @see LaunchableAdapterDelegate#getLaunchable(IServer, IModuleArtifact)
 	 */
-	public ILaunchable getLaunchable(IServer server, IModuleObject moduleObject) {
+	public ILaunchable getLaunchable(IServer server, IModuleArtifact moduleObject) {
 		Trace.trace("TomcatLaunchableAdapter " + server + "-" + moduleObject);
-		IServerDelegate delegate = server.getDelegate();
-		if (!(delegate instanceof TomcatServer))
+		if (server.getAdapter(TomcatServer.class) == null)
 			return null;
 		if (!(moduleObject instanceof Servlet) &&
-			!(moduleObject instanceof WebResource) &&
-			!(moduleObject instanceof NullModuleObject))
+			!(moduleObject instanceof WebResource))
 			return null;
-		if (!(moduleObject.getModule() instanceof IWebModule))
+		if (moduleObject.getModule().getAdapter(IWebModule.class) == null)
 			return null;
 
 		try {
-			URL url = ((IURLProvider) delegate).getModuleRootURL(moduleObject.getModule());
+			URL url = ((IURLProvider) server.getAdapter(IURLProvider.class)).getModuleRootURL(moduleObject.getModule());
 			
 			Trace.trace("root: " + url);
 
@@ -60,8 +59,6 @@
 					path = path.substring(1);
 				if (path != null && path.length() > 0)
 					url = new URL(url, path);
-			} else { // null
-				return new NullLaunchable();
 			}
 			return new HttpLaunchable(url);
 		} catch (Exception e) {
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatPlugin.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatPlugin.java
index 7f179b6..ab7094d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatPlugin.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatPlugin.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.File;
 import java.net.URL;
 import java.text.MessageFormat;
@@ -151,7 +152,9 @@
 	}
 	
 	public static ITomcatVersionHandler getTomcatVersionHandler(String id) {
-		id = id.substring(0, id.length() - 8);
+		if (id.indexOf("runtime") > 0)
+			id = id.substring(0, 30) + id.substring(38);
+		//id = id.substring(0, id.length() - 8);
 		if (TOMCAT_32.equals(id))
 			return new Tomcat32Handler();
 		else if (TOMCAT_40.equals(id))
@@ -176,6 +179,13 @@
 		if (verify32 != null)
 			return;
 	
+		// backup (empty) values
+		verify32 = new String[0];
+		verify40 = new String[0];
+		verify41 = new String[0];
+		verify50 = new String[0];
+		verify55 = new String[0];
+		
 		try {
 			URL url = getInstance().getBundle().getEntry(VERIFY_INSTALL_FILE);
 			url = Platform.resolve(url);
@@ -242,11 +252,6 @@
 			list.toArray(verify55);
 		} catch (Exception e) {
 			Trace.trace(Trace.SEVERE, "Could not load installation verification properties", e);
-			verify32 = new String[0];
-			verify40 = new String[0];
-			verify41 = new String[0];
-			verify50 = new String[0];
-			verify55 = new String[0];
 		}
 	}
 
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntime.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntime.java
index 2f18b9c..fbece93 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntime.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntime.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,48 +8,46 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.util.List;
 
-import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.IVMInstallType;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jst.server.tomcat.core.ITomcatRuntime;
+import org.eclipse.jst.server.tomcat.core.ITomcatRuntimeWorkingCopy;
 
-import org.eclipse.wst.server.core.IRuntime;
 import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.model.RuntimeDelegate;
 /**
  * 
  */
-public class TomcatRuntime implements ITomcatRuntime {
+public class TomcatRuntime extends RuntimeDelegate implements ITomcatRuntime, ITomcatRuntimeWorkingCopy {
 	protected static final String PROP_VM_INSTALL_TYPE_ID = "vm-install-type-id";
 	protected static final String PROP_VM_INSTALL_ID = "vm-install-id";
 
-	protected IRuntime runtime;
-
-	public TomcatRuntime() { }
-
-	public void initialize(IRuntime newRuntime) {
-		this.runtime = newRuntime;
+	public TomcatRuntime() {
+		// do nothing
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.wst.server.core.model.IRuntime#getLocation()
 	 */
 	public ITomcatVersionHandler getVersionHandler() {
-		IRuntimeType type = runtime.getRuntimeType();
+		IRuntimeType type = getRuntime().getRuntimeType();
 		return TomcatPlugin.getTomcatVersionHandler(type.getId());
 	}
 
-	public String getVMInstallTypeId() {
-		return runtime.getAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
+	protected String getVMInstallTypeId() {
+		return getAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
 	}
 
-	public String getVMInstallId() {
-		return runtime.getAttribute(PROP_VM_INSTALL_ID, (String)null);
+	protected String getVMInstallId() {
+		return getAttribute(PROP_VM_INSTALL_ID, (String)null);
 	}
 
 	public IVMInstall getVMInstall() {
@@ -63,12 +60,14 @@
 				if (id.equals(vmInstalls[i].getId()))
 					return vmInstalls[i];
 			}
-		} catch (Exception e) { }
+		} catch (Exception e) {
+			// ignore
+		}
 		return null;
 	}
 
 	public List getRuntimeClasspath() {
-		return getVersionHandler().getRuntimeClasspath(runtime.getLocation());
+		return getVersionHandler().getRuntimeClasspath(getRuntime().getLocation());
 	}
 
 	/**
@@ -78,26 +77,46 @@
 	 * @return boolean
 	 */
 	public boolean verifyLocation() {
-		return getVersionHandler().verifyInstallPath(runtime.getLocation());
+		return getVersionHandler().verifyInstallPath(getRuntime().getLocation());
 	}
 	
 	public IStatus validate() {
-		if (runtime.getName() == null || runtime.getName().length() == 0)
-			return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorRuntimeName"), null);
-
-		if (runtime.isWorkingCopy() && ServerUtil.isNameInUse(runtime))
-			return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorDuplicateRuntimeName"), null);
+		IStatus status = super.validate();
+		if (!status.isOK())
+			return status;
 	
-		IPath path = runtime.getLocation();
-		if (path == null || path.isEmpty())
-			return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, "", null);
-		else if (!verifyLocation())
+		if (!verifyLocation())
 			return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorInstallDir"), null);
-		else if (getVMInstall() == null) {
+		else if (getVMInstall() == null)
 			return new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorJRE"), null);
+		
+		return new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "", null);
+	}
+
+	public void setDefaults() {
+		IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
+		setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
+		
+		IRuntimeType type = getRuntimeWorkingCopy().getRuntimeType();
+		getRuntimeWorkingCopy().setLocation(new Path(TomcatPlugin.getPreference("location" + type.getId())));
+	}
+
+	public void setVMInstall(IVMInstall vmInstall) {
+		if (vmInstall == null) {
+			setVMInstall(null, null);
 		} else
-			return new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "", null);
+			setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
 	}
 	
-	public void dispose() { }
+	protected void setVMInstall(String typeId, String id) {
+		if (typeId == null)
+			setAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
+		else
+			setAttribute(PROP_VM_INSTALL_TYPE_ID, typeId);
+		
+		if (id == null)
+			setAttribute(PROP_VM_INSTALL_ID, (String)null);
+		else
+			setAttribute(PROP_VM_INSTALL_ID, id);
+	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeLocator.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeLocator.java
index 8a3d9f5..969fa73 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeLocator.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeLocator.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,38 +8,49 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.File;
 import java.io.FileFilter;
 
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jst.server.tomcat.core.ITomcatRuntimeWorkingCopy;
 
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.IRuntimeLocatorDelegate;
-import org.eclipse.wst.server.core.model.IRuntimeLocatorListener;
-import org.eclipse.wst.server.core.model.IRuntimeWorkingCopyDelegate;
+import org.eclipse.wst.server.core.*;
+import org.eclipse.wst.server.core.model.RuntimeLocatorDelegate;
 /**
  * 
  */
-public class TomcatRuntimeLocator implements IRuntimeLocatorDelegate {
+public class TomcatRuntimeLocator extends RuntimeLocatorDelegate {
 	protected static final String[] runtimeTypes = new String[] {
-		"org.eclipse.jst.server.tomcat.32.runtime",
-		"org.eclipse.jst.server.tomcat.40.runtime",
-		"org.eclipse.jst.server.tomcat.41.runtime",
-		"org.eclipse.jst.server.tomcat.50.runtime",
-		"org.eclipse.jst.server.tomcat.55.runtime"};
+		"org.eclipse.jst.server.tomcat.runtime.32",
+		"org.eclipse.jst.server.tomcat.runtime.40",
+		"org.eclipse.jst.server.tomcat.runtime.41",
+		"org.eclipse.jst.server.tomcat.runtime.50",
+		"org.eclipse.jst.server.tomcat.runtime.55"};
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.wst.server.core.model.IRuntimeFactoryDelegate#getKnownRuntimes()
 	 */
-	public void searchForRuntimes(IRuntimeLocatorListener listener, IProgressMonitor monitor) {
-		File[] files = File.listRoots();
+	public void searchForRuntimes(IPath path, IRuntimeLocator.RuntimeSearchListener listener, IProgressMonitor monitor) {
+		searchForRuntimes2(path, listener, monitor);
+	}
+
+	protected static void searchForRuntimes2(IPath path, IRuntimeLocator.RuntimeSearchListener listener, IProgressMonitor monitor) {
+		File[] files = null;
+		if (path != null) {
+			File f = path.toFile();
+			if (f.exists())
+				files = f.listFiles();
+			else
+				return;
+		} else
+			files = File.listRoots();
+
 		if (files != null) {
 			int size = files.length;
 			int work = 100 / size;
@@ -57,9 +67,9 @@
 			monitor.worked(100);
 	}
 
-	protected void searchDir(IRuntimeLocatorListener listener, File dir, int depth, IProgressMonitor monitor) {
+	protected static void searchDir(IRuntimeLocator.RuntimeSearchListener listener, File dir, int depth, IProgressMonitor monitor) {
 		if ("conf".equals(dir.getName())) {
-			IRuntimeWorkingCopy runtime = getRuntimeFromDir(dir.getParentFile());
+			IRuntimeWorkingCopy runtime = getRuntimeFromDir(dir.getParentFile(), monitor);
 			if (runtime != null) {
 				listener.runtimeFound(runtime);
 				return;
@@ -84,18 +94,16 @@
 		}
 	}
 
-	protected IRuntimeWorkingCopy getRuntimeFromDir(File dir) {
+	protected static IRuntimeWorkingCopy getRuntimeFromDir(File dir, IProgressMonitor monitor) {
 		for (int i = 0; i < runtimeTypes.length; i++) {
 			try {
-				IRuntimeType runtimeType = ServerCore.getRuntimeType(runtimeTypes[i]);
-				IRuntimeWorkingCopy runtime = runtimeType.createRuntime(dir.getAbsolutePath());
+				IRuntimeType runtimeType = ServerCore.findRuntimeType(runtimeTypes[i]);
+				IRuntimeWorkingCopy runtime = runtimeType.createRuntime(dir.getAbsolutePath(), monitor);
 				runtime.setName(dir.getName());
 				runtime.setLocation(new Path(dir.getAbsolutePath()));
-				IRuntimeWorkingCopyDelegate delegate = runtime.getWorkingCopyDelegate();
-				ITomcatRuntimeWorkingCopy wc = (ITomcatRuntimeWorkingCopy) delegate;
-				IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
-				wc.setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
-				IStatus status = wc.validate();
+				ITomcatRuntimeWorkingCopy wc = (ITomcatRuntimeWorkingCopy) runtime.getAdapter(ITomcatRuntimeWorkingCopy.class);
+				wc.setVMInstall(JavaRuntime.getDefaultVMInstall());
+				IStatus status = runtime.validate(monitor);
 				if (status == null || status.isOK())
 					return runtime;
 				
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeTargetHandler.java
index 90b9d93..f384cbd 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeTargetHandler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeTargetHandler.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,13 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.JavaCore;
@@ -21,9 +27,9 @@
 /**
  * 
  */
-public abstract class TomcatRuntimeTargetHandler extends ClasspathRuntimeTargetHandler {
-	public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime) {
-		ITomcatRuntime tomcatRuntime = (ITomcatRuntime) runtime.getDelegate();
+public class TomcatRuntimeTargetHandler extends ClasspathRuntimeTargetHandler {
+	public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime, IProgressMonitor monitor) {
+		ITomcatRuntime tomcatRuntime = (ITomcatRuntime) runtime.getAdapter(ITomcatRuntime.class);
 		IVMInstall vmInstall = tomcatRuntime.getVMInstall();
 		if (vmInstall != null) {
 			String name = vmInstall.getName();
@@ -31,23 +37,55 @@
 		}
 		return null;
 	}
-	
+
 	public String[] getClasspathEntryIds(IRuntime runtime) {
 		return new String[1];
 	}
 
+	/**
+	 * Return a label for the classpath container.
+	 *  
+	 * @return
+	 */
 	public String getClasspathContainerLabel(IRuntime runtime, String id) {
-		return getLabel();
+		String id2 = runtime.getId();
+		if (id2.indexOf("32") > 0)
+			return TomcatPlugin.getResource("%target32runtime");
+		else if (id2.indexOf("40") > 0)
+			return TomcatPlugin.getResource("%target40runtime");
+		else if (id2.indexOf("41") > 0)
+			return TomcatPlugin.getResource("%target41runtime");
+		else if (id2.indexOf("50") > 0)
+			return TomcatPlugin.getResource("%target50runtime");
+		
+		return TomcatPlugin.getResource("%target55runtime");
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.wst.server.target.IServerTargetDelegate#getClasspathEntries()
+	 * @see org.eclipse.jst.server
 	 */
 	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime, String id) {
 		return resolveClasspathContainer(runtime);
 	}
 
-	public abstract String getLabel();
-
-	public abstract IClasspathEntry[] resolveClasspathContainer(IRuntime runtime);
-}
+	/**
+	 * Resolve the classpath entries.
+	 */
+	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime) {
+		IPath installPath = runtime.getLocation();
+		
+		if (installPath == null)
+			return new IClasspathEntry[0];
+		
+		List list = new ArrayList();
+		if (runtime.getId().indexOf("32") > 0) {
+			IPath path = installPath.append("lib");
+			addLibraryEntries(list, path.toFile(), true);
+		} else {
+			IPath path = installPath.append("common");
+			addLibraryEntries(list, path.append("lib").toFile(), true);
+			addLibraryEntries(list, path.append("endorsed").toFile(), true);
+		}
+		return resolveList(list);
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeWorkingCopy.java
deleted file mode 100644
index 70616fd..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeWorkingCopy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.tomcat.core.ITomcatRuntimeWorkingCopy;
-
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-/**
- * 
- */
-public class TomcatRuntimeWorkingCopy extends TomcatRuntime implements ITomcatRuntimeWorkingCopy {
-	protected IRuntimeWorkingCopy wc;
-	
-	public void initialize(IRuntimeWorkingCopy runtime2) {
-		wc = runtime2;
-	}
-
-	public void setDefaults() {
-		IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
-		setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
-		
-		IRuntimeType type = wc.getRuntimeType();
-		wc.setLocation(new Path(TomcatPlugin.getPreference("location" + type.getId())));
-	}
-
-	public void setVMInstall(String typeId, String id) {
-		if (typeId == null)
-			wc.setAttribute(PROP_VM_INSTALL_TYPE_ID, (String)null);
-		else
-			wc.setAttribute(PROP_VM_INSTALL_TYPE_ID, typeId);
-		
-		if (id == null)
-			wc.setAttribute(PROP_VM_INSTALL_ID, (String)null);
-		else
-			wc.setAttribute(PROP_VM_INSTALL_ID, id);
-	}
-	
-	public void handleSave(byte id, IProgressMonitor monitor) { }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
index 93b6f45..79514ae 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -10,12 +10,12 @@
  **********************************************************************/
 package org.eclipse.jst.server.tomcat.core.internal;
 
-import java.io.File;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.runtime.*;
 import org.eclipse.debug.core.*;
 import org.eclipse.debug.core.model.IProcess;
@@ -27,28 +27,24 @@
 import org.eclipse.jst.server.tomcat.core.ITomcatConfiguration;
 import org.eclipse.jst.server.tomcat.core.ITomcatRuntime;
 import org.eclipse.jst.server.tomcat.core.ITomcatServer;
+import org.eclipse.jst.server.tomcat.core.ITomcatServerWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.WebModule;
-import org.eclipse.jst.server.tomcat.core.internal.command.RemoveWebModuleTask;
-import org.eclipse.jst.server.tomcat.core.internal.command.SetWebModulePathTask;
 
 import org.eclipse.wst.server.core.*;
 import org.eclipse.wst.server.core.model.*;
-import org.eclipse.wst.server.core.resources.IModuleResourceDelta;
-import org.eclipse.wst.server.core.util.SocketUtil;
+import org.eclipse.wst.server.core.util.PingThread;
 /**
  * Generic Tomcat server.
  */
-public class TomcatServer implements ITomcatServer, IStartableServer, IMonitorableServer {
-	private static final String ATTR_STOP = "stop-server";
-	
+public class TomcatServer extends ServerDelegate implements ITomcatServer, ITomcatServerWorkingCopy {
 	protected transient IPath tempDirectory;
-	
-	protected IServerState server;
 
 	// the thread used to ping the server to check for startup
 	protected transient PingThread ping = null;
 	protected transient IProcess process;
 	protected transient IDebugEventSetListener processListener;
+	
+	protected transient TomcatConfiguration configuration;
 
 	/**
 	 * TomcatServer.
@@ -57,47 +53,79 @@
 		super();
 	}
 
-	public void initialize(IServerState server2) {
-		this.server = server2;
-	}
-	
-	public void dispose() { }
-
 	public TomcatRuntime getTomcatRuntime() {
-		if (server.getRuntime() == null)
+		if (getServer().getRuntime() == null)
 			return null;
 		
-		return (TomcatRuntime) server.getRuntime().getDelegate();
+		return (TomcatRuntime) getServer().getAdapter(TomcatRuntime.class);
 	}
-	
+
 	public ITomcatVersionHandler getTomcatVersionHandler() {
-		if (server.getRuntime() == null)
+		if (getServer().getRuntime() == null)
 			return null;
 
-		TomcatRuntime runtime = (TomcatRuntime) server.getRuntime().getDelegate();
-		return runtime.getVersionHandler();
+		return getTomcatRuntime().getVersionHandler();
 	}
-	
+
+	public ITomcatConfiguration getServerConfiguration() {
+		return getTomcatConfiguration();
+	}
+
 	public TomcatConfiguration getTomcatConfiguration() {
-		IServerConfiguration configuration = server.getServerConfiguration();
-		if (configuration == null)
-			return null;
-		
-		return (TomcatConfiguration) configuration.getDelegate();
+		if (configuration == null) {
+			IFolder folder = getServer().getServerConfiguration();
+			/*IPath path = null;
+			if (getServerWC() != null && getServerWC().getRuntime() != null)
+				path = getServerWC().getRuntime().getLocation().append("conf");
+			else if (getServer() != null && getServer().getRuntime() != null)
+				path = getServer().getRuntime().getLocation().append("conf");
+			else
+				return null;*/
+			
+			String id = getServer().getServerType().getId();
+			if (id.indexOf("32") > 0)
+				configuration = new Tomcat32Configuration(folder);
+			else if (id.indexOf("40") > 0)
+				configuration = new Tomcat40Configuration(folder);
+			else if (id.indexOf("41") > 0)
+				configuration = new Tomcat41Configuration(folder);
+			else if (id.indexOf("50") > 0)
+				configuration = new Tomcat50Configuration(folder);
+			else if (id.indexOf("55") > 0)
+				configuration = new Tomcat55Configuration(folder);
+			try {
+				configuration.load(folder, null);
+			} catch (CoreException ce) {
+				// ignore
+			}
+		}
+		return configuration;
 	}
 
-	/**
-	 * Returns the project publisher that can be used to
-	 * publish the given project.
-	 *
-	 * @param project org.eclipse.core.resources.IProject
-	 * @return org.eclipse.wst.server.core.model.IProjectPublisher
-	 */
-	public IPublisher getPublisher(List parents, IModule module) {
-		if (isTestEnvironment())
-			return null;
+	public void importConfiguration(IRuntime runtime, IProgressMonitor monitor) {
+		IPath path = runtime.getLocation().append("conf");
 		
-		return new TomcatWebModulePublisher((IWebModule) module, server.getRuntime().getLocation());
+		String id = getServer().getServerType().getId();
+		if (id.indexOf("32") > 0)
+			configuration = new Tomcat32Configuration(null);
+		else if (id.indexOf("40") > 0)
+			configuration = new Tomcat40Configuration(null);
+		else if (id.indexOf("41") > 0)
+			configuration = new Tomcat41Configuration(null);
+		else if (id.indexOf("50") > 0)
+			configuration = new Tomcat50Configuration(null);
+		else if (id.indexOf("55") > 0)
+			configuration = new Tomcat55Configuration(null);
+		try {
+			configuration.load(path, monitor);
+		} catch (CoreException ce) {
+			// ignore
+		}
+	}
+
+	public void saveConfiguration(IProgressMonitor monitor) throws CoreException {
+		TomcatConfiguration config = getTomcatConfiguration();
+		config.save(getServer().getServerConfiguration(), monitor);
 	}
 
 	/**
@@ -110,22 +138,21 @@
 			if (module == null || !(module instanceof IWebModule))
 				return null;
 	
-			IServerConfiguration serverConfig = server.getServerConfiguration();
+			IFolder serverConfig = getServer().getServerConfiguration();
 			if (serverConfig == null)
 				return null;
 	
-			TomcatConfiguration config = (TomcatConfiguration) serverConfig.getDelegate();
+			TomcatConfiguration config = getTomcatConfiguration();
 			if (config == null)
 				return null;
 	
 			String url = "http://localhost";
 			int port = config.getMainPort().getPort();
-			port = ServerCore.getServerMonitorManager().getMonitoredPort(server, port, "web");
+			port = ServerCore.getServerMonitorManager().getMonitoredPort(getServer(), port, "web");
 			if (port != 80)
 				url += ":" + port;
 
-			IWebModule module2 = (IWebModule) module;
-			url += config.getWebModuleURL(module2);
+			url += config.getWebModuleURL(module);
 			
 			if (!url.endsWith("/"))
 				url += "/";
@@ -168,7 +195,7 @@
 		IPath configPath = null;
 		if (isTestEnvironment())
 			configPath = getTempDirectory();
-		return getTomcatVersionHandler().getRuntimeVMArguments(server.getRuntime().getLocation(), configPath, isSecure());
+		return getTomcatVersionHandler().getRuntimeVMArguments(getServer().getRuntime().getLocation(), configPath, isSecure());
 	}
 
 	/**
@@ -178,7 +205,7 @@
 	 */
 	public IPath getTempDirectory() {
 		if (tempDirectory == null)
-			tempDirectory = server.getTempDirectory();
+			tempDirectory = getServer().getTempDirectory();
 		return tempDirectory;
 	}
 
@@ -189,7 +216,7 @@
 	 * @return boolean
 	 */
 	public boolean isDebug() {
-		return server.getAttribute(PROPERTY_DEBUG, false);
+		return getAttribute(PROPERTY_DEBUG, false);
 	}
 
 	/**
@@ -198,7 +225,7 @@
 	 * @return boolean
 	 */
 	public boolean isTestEnvironment() {
-		return server.getAttribute(PROPERTY_TEST_ENVIRONMENT, false);
+		return getAttribute(PROPERTY_TEST_ENVIRONMENT, false);
 	}
 
 	/**
@@ -207,7 +234,7 @@
 	 * @return boolean
 	 */
 	public boolean isSecure() {
-		return server.getAttribute(PROPERTY_SECURE, false);
+		return getAttribute(PROPERTY_SECURE, false);
 	}
 	
 	protected static String renderCommandLine(String[] commandLine, String separator) {
@@ -221,183 +248,6 @@
 		return buf.toString();
 	}
 
-	public void setProcess(final IProcess newProcess) {
-		if (process != null)
-			return;
-
-		process = newProcess;
-		processListener = new IDebugEventSetListener() {
-			public void handleDebugEvents(DebugEvent[] events) {
-				if (events != null) {
-					int size = events.length;
-					for (int i = 0; i < size; i++) {
-						if (process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
-							DebugPlugin.getDefault().removeDebugEventListener(this);
-							stopImpl();
-						}
-					}
-				}
-			}
-		};
-		DebugPlugin.getDefault().addDebugEventListener(processListener);
-	}
-
-	protected void stopImpl() {
-		if (ping != null) {
-			ping.stopPinging();
-			ping = null;
-		}
-		if (process != null) {
-			process = null;
-			DebugPlugin.getDefault().removeDebugEventListener(processListener);
-			processListener = null;
-		}
-		server.setServerState(IServer.SERVER_STOPPED);
-	}
-
-	/**
-	 * Methods called to notify that publishing is about to begin.
-	 * This allows the server to open a connection to the server
-	 * or get any global information ready.
-	 *
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 */
-	public IStatus publishStart(IProgressMonitor monitor) {
-		return new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%publishingStarted"), null);
-	}
-	
-	public IStatus publishConfiguration(IProgressMonitor monitor) {
-		IPath confDir = null;
-		if (isTestEnvironment()) {
-			confDir = getTempDirectory();
-			File temp = confDir.append("conf").toFile();
-			if (!temp.exists())
-				temp.mkdirs();
-		} else
-			confDir = server.getRuntime().getLocation();
-		return getTomcatConfiguration().backupAndPublish(confDir, !isTestEnvironment(), monitor);
-	}
-
-	/**
-	 * Methods called to notify that publishing has finished.
-	 * The server can close any open connections to the server
-	 * and do any cleanup operations.
-	 *
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 */
-	public IStatus publishStop(IProgressMonitor monitor) {
-		server.setConfigurationSyncState(IServer.SYNC_STATE_IN_SYNC);
-		return new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%publishingStopped"), null);
-	}
-
-	/**
-	 * Return true if the server should be terminated before the workbench
-	 * shutdown and false if not. If the server is not terminated when
-	 * workbench shutdown, then the server should get reconnected
-	 * in the server load when the workbench startsup.
-	 * 
-	 * @return boolean
-	 **/
-	public boolean isTerminateOnShutdown() {
-		return true;
-	}
-
-	/**
-	 * Setup for starting the server.
-	 * 
-	 * @param launch ILaunch
-	 * @param launchMode String
-	 * @param monitor IProgressMonitor
-	 */
-	public void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException {
-		if ("true".equals(launch.getLaunchConfiguration().getAttribute(ATTR_STOP, "false")))
-			return;
-		IStatus status = getTomcatRuntime().validate();
-		if (status != null && !status.isOK())
-			throw new CoreException(status);
-
-		//setRestartNeeded(false);
-		TomcatConfiguration configuration = getTomcatConfiguration();
-	
-		// check that ports are free
-		Iterator iterator = configuration.getServerPorts().iterator();
-		while (iterator.hasNext()) {
-			IServerPort sp = (IServerPort) iterator.next();
-			if (SocketUtil.isPortInUse(sp.getPort(), 5))
-				throw new CoreException(new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorPortInUse", new String[] {sp.getPort() + "", sp.getName()}), null));
-		}
-		
-		server.setServerState(IServer.SERVER_STARTING);
-	
-		// ping server to check for startup
-		try {
-			String url = "http://localhost";
-			int port = configuration.getMainPort().getPort();
-			if (port != 80)
-				url += ":" + port;
-			ping = new PingThread(this, server, url, launchMode);
-			ping.start();
-		} catch (Exception e) {
-			Trace.trace(Trace.SEVERE, "Can't ping for Tomcat startup.");
-		}
-	}
-
-	/**
-	 * Cleanly shuts down and terminates the server.
-	 */
-	public void stop() {
-		byte state = server.getServerState();
-		if (state == IServer.SERVER_STOPPED)
-			return;
-		else if (state == IServer.SERVER_STARTING || state == IServer.SERVER_STOPPING) {
-			terminate();
-			return;
-		}
-
-		try {
-			Trace.trace(Trace.FINER, "Stopping Tomcat");
-			if (state != IServer.SERVER_STOPPED)
-				server.setServerState(IServer.SERVER_STOPPING);
-	
-			ILaunchConfiguration launchConfig = server.getLaunchConfiguration(true);
-			ILaunchConfigurationWorkingCopy wc = launchConfig.getWorkingCopy();
-			
-			String args = renderCommandLine(getRuntimeProgramArguments(false), " ");
-			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args);
-			wc.setAttribute(ATTR_STOP, "true");
-			wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
-		} catch (Exception e) {
-			Trace.trace(Trace.SEVERE, "Error stopping Tomcat", e);
-		}
-	}
-
-	/**
-	 * Terminates the server.
-	 */
-	public void terminate() {
-		if (server.getServerState() == IServer.SERVER_STOPPED)
-			return;
-
-		try {
-			server.setServerState(IServer.SERVER_STOPPING);
-			Trace.trace(Trace.FINER, "Killing the Tomcat process");
-			if (process != null && !process.isTerminated()) {
-				process.terminate();
-				stopImpl();
-			}
-		} catch (Exception e) {
-			Trace.trace(Trace.SEVERE, "Error killing the process", e);
-		}
-	}
-	
-	public int getStartTimeout() {
-		return 45000;
-	}
-	
-	public int getStopTimeout() {
-		return 10000;
-	}
-
 	/**
 	 * Return a string representation of this object.
 	 * @return java.lang.String
@@ -411,21 +261,24 @@
 	 * (i.e. publish any changes to the server, and restart if necessary)
 	 * @param config org.eclipse.wst.server.core.model.IServerConfiguration
 	 */
-	public void updateConfiguration() {
+	/*public void updateConfiguration() {
 		Trace.trace(Trace.FINEST, "Configuration updated " + this);
 		//setConfigurationSyncState(SYNC_STATE_DIRTY);
 		//setRestartNeeded(true);
-	}
+	}*/
 
 	/**
 	 * Respond to updates within the project tree.
 	 */
-	public void updateModule(final IModule module, IModuleResourceDelta delta) { }
+	//public void updateModule(final IModule module, IModuleResourceDelta delta) { }
 
 	public void setLaunchDefaults(ILaunchConfigurationWorkingCopy workingCopy) {
 		ITomcatRuntime runtime = getTomcatRuntime();
-		workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, runtime.getVMInstallTypeId());
-		workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, runtime.getVMInstall().getName());
+		IVMInstall vmInstall = runtime.getVMInstall();
+		if (vmInstall != null) {
+			workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, vmInstall.getVMInstallType().getId());
+			workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, vmInstall.getName());
+		}
 		
 		String[] args = getRuntimeProgramArguments(true);
 		String args2 = renderCommandLine(args, " ");
@@ -438,11 +291,12 @@
 		List cp = runtime.getRuntimeClasspath();
 		
 		// add tools.jar to the path
-		IVMInstall vmInstall = runtime.getVMInstall();
 		if (vmInstall != null) {
 			try {
 				cp.add(JavaRuntime.newRuntimeContainerClasspathEntry(new Path(JavaRuntime.JRE_CONTAINER).append("org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType").append(vmInstall.getName()), IRuntimeClasspathEntry.BOOTSTRAP_CLASSES));
-			} catch (Exception e) { }			
+			} catch (Exception e) {
+				// ignore
+			}			
 			
 			IPath jrePath = new Path(vmInstall.getInstallLocation().getAbsolutePath());
 			if (jrePath != null) {
@@ -475,8 +329,8 @@
 	 * @param project org.eclipse.core.resources.IProject
 	 * @return java.util.List
 	 */
-	public List getChildModules(IModule project) {
-		return new ArrayList(0);
+	public IModule[] getChildModules(IModule project) {
+		return new IModule[0];
 	}
 
 	/**
@@ -494,19 +348,16 @@
 	 * @param project org.eclipse.core.resources.IProject
 	 * @return java.util.List
 	 */
-	public List getParentModules(IModule module) throws CoreException {
-		if (module instanceof IWebModule) {
-			IWebModule webModule = (IWebModule) module;
+	public IModule[] getParentModules(IModule module) throws CoreException {
+		if (module.getAdapter(IWebModule.class) != null) {
 			IStatus status = canModifyModules(new IModule[] { module }, null);
 			if (status == null || !status.isOK())
 				throw new CoreException(status);
-			ArrayList l = new ArrayList();
-			l.add(webModule);
-			return l;
+			return new IModule[] { module };
 		}
 		return null;
 	}
-	
+
 	/**
 	 * Returns the project references for projects that are in
 	 * this configuration.
@@ -525,14 +376,9 @@
 				
 				String memento = module.getMemento();
 				if (memento != null) {
-					int index = memento.indexOf(":");
-					if (index > 0) {
-						String factoryId = memento.substring(0, index);
-						String mem = memento.substring(index + 1);
-						IModule module2 = ServerUtil.getModule(factoryId, mem);
-						if (module2 != null)
-							list.add(module2);
-					}
+					IModule module2 = ServerUtil.getModule(memento);
+					if (module2 != null)
+						list.add(module2);
 				}
 			}
 		}
@@ -544,7 +390,7 @@
 	}
 	
 	public byte getModuleState(IModule module) {
-		return IServer.MODULE_STATE_STARTED;
+		return IServer.STATE_STARTED;
 	}
 
 	/**
@@ -571,91 +417,89 @@
 		return new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "%canModifyModules", null);
 	}
 
+	public IServerPort[] getServerPorts() {
+		if (getServer().getServerConfiguration() == null)
+			return new IServerPort[0];
+		
+		List list = getTomcatConfiguration().getServerPorts();
+		IServerPort[] sp = new IServerPort[list.size()];
+		list.toArray(sp);
+		return sp;
+	}
+	
+	public void setDefaults() {
+		setTestEnvironment(true);
+	}
+	
 	/**
-	 * Method called when changes to the modules or module factories
-	 * within this configuration occur. Return any necessary commands to repair
-	 * or modify the server configuration in response to these changes.
-	 * 
-	 * @param org.eclipse.wst.server.core.model.IModuleFactoryEvent[]
-	 * @param org.eclipse.wst.server.core.model.IModuleEvent[]
-	 * @return org.eclipse.wst.server.core.model.ITask[]
+	 * Sets this process to debug mode. This feature only works
+	 * with Tomcat v4.0.
+	 *
+	 * @param b boolean
 	 */
-	public ITask[] getRepairCommands(IModuleFactoryEvent[] factoryEvent, IModuleEvent[] moduleEvent) {
-		List list = new ArrayList();
-		// check for Web modules being removed
-		if (factoryEvent != null) {
-			List modules = getTomcatConfiguration().getWebModules();
-			int size = modules.size();
+	public void setDebug(boolean b) {
+		setAttribute(PROPERTY_DEBUG, b);
+	}
+
+	/**
+	 * Sets this process to secure mode.
+	 * @param b boolean
+	 */
+	public void setSecure(boolean b) {
+		setAttribute(PROPERTY_SECURE, b);
+	}
+
+	/**
+	 * Sets this server to test environment mode.
+	 * 
+	 * @param b boolean
+	 */
+	public void setTestEnvironment(boolean b) {
+		setAttribute(PROPERTY_TEST_ENVIRONMENT, b);
+	}
+	
+	/**
+	 * Add the given project to this configuration. The project
+	 * has already been verified using isSupportedProject() and
+	 * does not already exist in the configuration.
+	 *
+	 * @param ref java.lang.String
+	 */
+	public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
+		IStatus status = canModifyModules(add, remove);
+		if (status == null || !status.isOK())
+			throw new CoreException(status);
+		
+		TomcatConfiguration config = getTomcatConfiguration();
+
+		if (add != null) {
+			int size = add.length;
 			for (int i = 0; i < size; i++) {
-				WebModule module = (WebModule) modules.get(i);
-				
-				String memento = module.getMemento();
-				if (memento != null) {
-					boolean found = false;
-					int index = memento.indexOf(":");
-					String factoryId = memento.substring(0, index);
-					String mem = memento.substring(index + 1);
-					
-					int size2 = factoryEvent.length;
-					for (int j = 0; !found && j < size2; j++) {
-						IModule[] removed = factoryEvent[j].getRemovedModules();
-						if (removed != null) {
-							int size3 = removed.length;
-							for (int k = 0; !found && k < size3; k++) {
-								if (removed[k] != null && removed[k].getFactoryId().equals(factoryId) &&
-										removed[k].getId().equals(mem)) {
-									list.add(new RemoveWebModuleTask(i));
-									found = true;
-								}
-							}
-						}
-					}
-				}
+				IModule module3 = add[i];
+				IWebModule module = (IWebModule) module3.getAdapter(IWebModule.class);
+				String contextRoot = module.getContextRoot();
+				if (contextRoot != null && !contextRoot.startsWith("/"))
+					contextRoot = "/" + contextRoot;
+				WebModule module2 = new WebModule(contextRoot,
+						module.getLocation().toOSString(), module3.getId(), true);
+				config.addWebModule(-1, module2);
 			}
 		}
 		
-		// check for changing context roots
-		if (moduleEvent != null) {
-			int size2 = moduleEvent.length;
+		if (remove != null) {
+			int size2 = remove.length;
 			for (int j = 0; j < size2; j++) {
-				if (moduleEvent[j].getModule() instanceof IWebModule && moduleEvent[j].isChanged()) {
-					IWebModule webModule = (IWebModule) moduleEvent[j].getModule();
-					
-					String contextRoot = webModule.getContextRoot();
-					if (contextRoot != null && !contextRoot.startsWith("/"))
-						contextRoot = "/" + contextRoot;
-					
-					List modules = getTomcatConfiguration().getWebModules();
-					int size = modules.size();
-					boolean found = false;
-					for (int i = 0; !found && i < size; i++) {
-						WebModule module = (WebModule) modules.get(i);
-						
-						String memento = module.getMemento();
-						if (memento != null) {
-							int index = memento.indexOf(":");
-							String factoryId = memento.substring(0, index);
-							String mem = memento.substring(index + 1);
-							if (webModule.getFactoryId().equals(factoryId) && webModule.getId().equals(mem)) {
-								if (!module.getPath().equals(contextRoot)) {
-									list.add(new SetWebModulePathTask(i, contextRoot));
-									found = true;
-								}
-							}
-						}
-					}
+				IModule module3 = remove[j];
+				String memento = module3.getId();
+				List modules = getTomcatConfiguration().getWebModules();
+				int size = modules.size();
+				for (int i = 0; i < size; i++) {
+					WebModule module = (WebModule) modules.get(i);
+					if (memento.equals(module.getMemento()))
+						config.removeWebModule(i);
 				}
 			}
 		}
-
-		ITask[] commands = new ITask[list.size()];
-		list.toArray(commands);
-		return commands;
+		config.save(config.getFolder(), monitor);
 	}
-
-	public List getServerPorts() {
-		if (server.getServerConfiguration() == null)
-			return new ArrayList();
-		return getTomcatConfiguration().getServerPorts();
-	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerBehaviour.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerBehaviour.java
new file mode 100644
index 0000000..88aaec5
--- /dev/null
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerBehaviour.java
@@ -0,0 +1,365 @@
+/**********************************************************************
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.*;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jst.server.j2ee.IWebModule;
+import org.eclipse.jst.server.tomcat.core.ITomcatRuntime;
+import org.eclipse.jst.server.tomcat.core.ITomcatServerBehaviour;
+
+import org.eclipse.wst.server.core.*;
+import org.eclipse.wst.server.core.model.*;
+import org.eclipse.wst.server.core.util.FileUtil;
+import org.eclipse.wst.server.core.util.PingThread;
+import org.eclipse.wst.server.core.util.SocketUtil;
+/**
+ * Generic Tomcat server.
+ */
+public class TomcatServerBehaviour extends ServerBehaviourDelegate implements ITomcatServerBehaviour {
+	private static final String ATTR_STOP = "stop-server";
+	
+	protected transient IPath tempDirectory;
+
+	// the thread used to ping the server to check for startup
+	protected transient PingThread ping = null;
+	protected transient IProcess process;
+	protected transient IDebugEventSetListener processListener;
+
+	/**
+	 * TomcatServer.
+	 */
+	public TomcatServerBehaviour() {
+		super();
+	}
+	
+	public void initialize() {
+		setMode(ILaunchManager.RUN_MODE);
+	}
+
+	public TomcatRuntime getTomcatRuntime() {
+		if (getServer().getRuntime() == null)
+			return null;
+		
+		return (TomcatRuntime) getServer().getRuntime().getAdapter(TomcatRuntime.class);
+	}
+	
+	public ITomcatVersionHandler getTomcatVersionHandler() {
+		if (getServer().getRuntime() == null)
+			return null;
+
+		return getTomcatRuntime().getVersionHandler();
+	}
+	
+	public TomcatConfiguration getTomcatConfiguration() {
+		return getTomcatServer().getTomcatConfiguration();
+	}
+
+	public TomcatServer getTomcatServer() {
+		return (TomcatServer) getServer().getAdapter(TomcatServer.class);
+	}
+
+	/**
+	 * Return the runtime class name.
+	 *
+	 * @return java.lang.String
+	 */
+	public String getRuntimeClass() {
+		return getTomcatVersionHandler().getRuntimeClass();
+	}
+
+	/**
+	 * Return the program's runtime arguments to start or stop.
+	 *
+	 * @param boolean starting
+	 * @return java.lang.String
+	 */
+	protected String[] getRuntimeProgramArguments(boolean starting) {
+		IPath configPath = null;
+		if (getTomcatServer().isTestEnvironment())
+			configPath = getTempDirectory();
+		return getTomcatVersionHandler().getRuntimeProgramArguments(configPath, getTomcatServer().isDebug(), starting);
+	}
+
+	/**
+	 * Return the runtime (VM) arguments.
+	 *
+	 * @return java.lang.String
+	 */
+	protected String[] getRuntimeVMArguments() {
+		IPath configPath = null;
+		if (getTomcatServer().isTestEnvironment())
+			configPath = getTempDirectory();
+		return getTomcatVersionHandler().getRuntimeVMArguments(getServer().getRuntime().getLocation(), configPath, getTomcatServer().isSecure());
+	}
+
+	/**
+	 * Obtain a temporary directory if this server doesn't
+	 * already have one. Otherwise, return the existing one.
+	 * @return java.io.File
+	 */
+	public IPath getTempDirectory() {
+		if (tempDirectory == null)
+			tempDirectory = getServer().getTempDirectory();
+		return tempDirectory;
+	}
+	
+	protected static String renderCommandLine(String[] commandLine, String separator) {
+		if (commandLine == null || commandLine.length < 1)
+			return "";
+		StringBuffer buf= new StringBuffer(commandLine[0]);
+		for (int i = 1; i < commandLine.length; i++) {
+			buf.append(separator);
+			buf.append(commandLine[i]);
+		}	
+		return buf.toString();
+	}
+
+	public void setProcess(final IProcess newProcess) {
+		if (process != null)
+			return;
+
+		process = newProcess;
+		processListener = new IDebugEventSetListener() {
+			public void handleDebugEvents(DebugEvent[] events) {
+				if (events != null) {
+					int size = events.length;
+					for (int i = 0; i < size; i++) {
+						if (process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
+							DebugPlugin.getDefault().removeDebugEventListener(this);
+							stopImpl();
+						}
+					}
+				}
+			}
+		};
+		DebugPlugin.getDefault().addDebugEventListener(processListener);
+	}
+
+	protected void stopImpl() {
+		if (ping != null) {
+			ping.stopPinging();
+			ping = null;
+		}
+		if (process != null) {
+			process = null;
+			DebugPlugin.getDefault().removeDebugEventListener(processListener);
+			processListener = null;
+		}
+		setServerState(IServer.STATE_STOPPED);
+	}
+
+	public void publishServer(IProgressMonitor monitor) throws CoreException {
+		IPath confDir = null;
+		if (getTomcatServer().isTestEnvironment()) {
+			confDir = getTempDirectory();
+			File temp = confDir.append("conf").toFile();
+			if (!temp.exists())
+				temp.mkdirs();
+		} else
+			confDir = getServer().getRuntime().getLocation();
+		IStatus status = getTomcatConfiguration().backupAndPublish(confDir, !getTomcatServer().isTestEnvironment(), monitor);
+		if (status != null && !status.isOK())
+			throw new CoreException(status);
+		
+		setServerPublishState(IServer.PUBLISH_STATE_NONE);
+	}
+
+	/**
+	 * Returns the project publisher that can be used to
+	 * publish the given project.
+	 */
+	public void publishModule(IModule[] parents, IModule module, IProgressMonitor monitor) {
+		if (getTomcatServer().isTestEnvironment())
+			return;
+
+		IWebModule webModule = (IWebModule) module;
+		IPath from = webModule.getLocation();
+		IPath to = getServer().getRuntime().getLocation().append("webapps").append(webModule.getContextRoot());
+		FileUtil.smartCopyDirectory(from.toOSString(), to.toOSString(), monitor);
+		
+		setModulePublishState(module, IServer.PUBLISH_STATE_NONE);
+	}
+
+	/**
+	 * Setup for starting the server.
+	 * 
+	 * @param launch ILaunch
+	 * @param launchMode String
+	 * @param monitor IProgressMonitor
+	 */
+	public void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException {
+		if ("true".equals(launch.getLaunchConfiguration().getAttribute(ATTR_STOP, "false")))
+			return;
+		IStatus status = getTomcatRuntime().validate();
+		if (status != null && !status.isOK())
+			throw new CoreException(status);
+
+		//setRestartNeeded(false);
+		TomcatConfiguration configuration = getTomcatConfiguration();
+	
+		// check that ports are free
+		Iterator iterator = configuration.getServerPorts().iterator();
+		while (iterator.hasNext()) {
+			IServerPort sp = (IServerPort) iterator.next();
+			if (SocketUtil.isPortInUse(sp.getPort(), 5))
+				throw new CoreException(new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%errorPortInUse", new String[] {sp.getPort() + "", sp.getName()}), null));
+		}
+		
+		setServerState(IServer.STATE_STARTING);
+	
+		// ping server to check for startup
+		try {
+			String url = "http://localhost";
+			int port = configuration.getMainPort().getPort();
+			if (port != 80)
+				url += ":" + port;
+			ping = new PingThread(getServer(), this, url, 50);
+		} catch (Exception e) {
+			Trace.trace(Trace.SEVERE, "Can't ping for Tomcat startup.");
+		}
+	}
+
+	/**
+	 * Cleanly shuts down and terminates the server.
+	 */
+	public void stop(boolean force) {
+		if (force) {
+			terminate();
+			return;
+		}
+		int state = getServer().getServerState();
+		if (state == IServer.STATE_STOPPED)
+			return;
+		else if (state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING) {
+			terminate();
+			return;
+		}
+
+		try {
+			Trace.trace(Trace.FINER, "Stopping Tomcat");
+			if (state != IServer.STATE_STOPPED)
+				setServerState(IServer.STATE_STOPPING);
+	
+			ILaunchConfiguration launchConfig = getServer().getLaunchConfiguration(true, null);
+			ILaunchConfigurationWorkingCopy wc = launchConfig.getWorkingCopy();
+			
+			String args = renderCommandLine(getRuntimeProgramArguments(false), " ");
+			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args);
+			wc.setAttribute(ATTR_STOP, "true");
+			wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
+		} catch (Exception e) {
+			Trace.trace(Trace.SEVERE, "Error stopping Tomcat", e);
+		}
+	}
+
+	/**
+	 * Terminates the server.
+	 */
+	protected void terminate() {
+		if (getServer().getServerState() == IServer.STATE_STOPPED)
+			return;
+
+		try {
+			setServerState(IServer.STATE_STOPPING);
+			Trace.trace(Trace.FINER, "Killing the Tomcat process");
+			if (process != null && !process.isTerminated()) {
+				process.terminate();
+				stopImpl();
+			}
+		} catch (Exception e) {
+			Trace.trace(Trace.SEVERE, "Error killing the process", e);
+		}
+	}
+
+	/**
+	 * Return a string representation of this object.
+	 * @return java.lang.String
+	 */
+	public String toString() {
+		return "TomcatServer";
+	}
+
+	/**
+	 * Update the given configuration in the server.
+	 * (i.e. publish any changes to the server, and restart if necessary)
+	 * @param config org.eclipse.wst.server.core.model.IServerConfiguration
+	 */
+	/*public void updateConfiguration() {
+		Trace.trace(Trace.FINEST, "Configuration updated " + this);
+		//setConfigurationSyncState(SYNC_STATE_DIRTY);
+		//setRestartNeeded(true);
+	}*/
+
+	/**
+	 * Respond to updates within the project tree.
+	 */
+	//public void updateModule(final IModule module, IModuleResourceDelta delta) { }
+
+	public void setLaunchDefaults(ILaunchConfigurationWorkingCopy workingCopy) {
+		ITomcatRuntime runtime = getTomcatRuntime();
+		IVMInstall vmInstall = runtime.getVMInstall();
+		if (vmInstall != null) {
+			workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, vmInstall.getVMInstallType().getId());
+			workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, vmInstall.getName());
+		}
+		
+		String[] args = getRuntimeProgramArguments(true);
+		String args2 = renderCommandLine(args, " ");
+		workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args2);
+
+		args = getRuntimeVMArguments();
+		args2 = renderCommandLine(args, " ");
+		workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, args2);
+		
+		List cp = runtime.getRuntimeClasspath();
+		
+		// add tools.jar to the path
+		if (vmInstall != null) {
+			try {
+				cp.add(JavaRuntime.newRuntimeContainerClasspathEntry(new Path(JavaRuntime.JRE_CONTAINER).append("org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType").append(vmInstall.getName()), IRuntimeClasspathEntry.BOOTSTRAP_CLASSES));
+			} catch (Exception e) {
+				// ignore
+			}			
+			
+			IPath jrePath = new Path(vmInstall.getInstallLocation().getAbsolutePath());
+			if (jrePath != null) {
+				IPath toolsPath = jrePath.append("lib").append("tools.jar");
+				if (toolsPath.toFile().exists()) {
+					cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(toolsPath));
+				}
+			}
+		}
+		
+		Iterator cpi = cp.iterator();
+		List list = new ArrayList();
+		while (cpi.hasNext()) {
+			IRuntimeClasspathEntry entry = (IRuntimeClasspathEntry) cpi.next();
+			try {
+				list.add(entry.getMemento());
+			} catch (Exception e) {
+				Trace.trace(Trace.SEVERE, "Could not resolve classpath entry: " + entry, e);
+			}
+		}
+		workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, list);
+		workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
+	}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerLocator.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerLocator.java
index 6f2388f..da7571d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerLocator.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerLocator.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,36 +8,30 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import org.eclipse.core.runtime.IProgressMonitor;
 
 import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.IRuntimeLocatorListener;
-import org.eclipse.wst.server.core.model.IServerLocatorDelegate;
-import org.eclipse.wst.server.core.model.IServerLocatorListener;
+import org.eclipse.wst.server.core.model.ServerLocatorDelegate;
 /**
  * 
  */
-public class TomcatServerLocator extends TomcatRuntimeLocator implements IServerLocatorDelegate {
-	/*protected static final String[] serverTypes = new String[] {
-		"org.eclipse.jst.server.tomcat.32",
-		"org.eclipse.jst.server.tomcat.40",
-		"org.eclipse.jst.server.tomcat.41",
-		"org.eclipse.jst.server.tomcat.50"};*/
-
-	public void searchForServers(final IServerLocatorListener listener, IProgressMonitor monitor) {
-		IRuntimeLocatorListener listener2 = new IRuntimeLocatorListener() {
-			public void runtimeFound(IRuntime runtime) {
+public class TomcatServerLocator extends ServerLocatorDelegate {
+	public void searchForServers(String host, final IServerLocator.Listener listener, final IProgressMonitor monitor) {
+		IRuntimeLocator.RuntimeSearchListener listener2 = new IRuntimeLocator.RuntimeSearchListener() {
+			public void runtimeFound(IRuntimeWorkingCopy runtime) {
 				String runtimeTypeId = runtime.getRuntimeType().getId();
 				String serverTypeId = runtimeTypeId.substring(0, runtimeTypeId.length() - 8);
-				IServerType serverType = ServerCore.getServerType(serverTypeId);
+				IServerType serverType = ServerCore.findServerType(serverTypeId);
 				try {
-					IServer server = serverType.createServer(serverTypeId, null, runtime);
+					IServerWorkingCopy server = serverType.createServer(serverTypeId, null, runtime, monitor);
 					listener.serverFound(server);
 				} catch (Exception e) {
 					Trace.trace(Trace.WARNING, "Could not create Tomcat server", e);
 				}
 			}
 		};
-		searchForRuntimes(listener2, monitor);
+		TomcatRuntimeLocator.searchForRuntimes2(null, listener2, monitor);
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerUtil.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerUtil.java
index 5e0f98b..787ca39 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerUtil.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerUtil.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.JavaCore;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerWorkingCopy.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerWorkingCopy.java
deleted file mode 100644
index 6a2f595..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerWorkingCopy.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.util.List;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.ITomcatServerWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.WebModule;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.model.IModule;
-/**
- * 
- */
-public class TomcatServerWorkingCopy extends TomcatServer implements ITomcatServerWorkingCopy {
-	protected IServerWorkingCopy workingCopy;
-
-	public TomcatServerWorkingCopy() {
-		super();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.wst.server.core.model.IServerWorkingCopyDelegate#initializeWorkingCopy(org.eclipse.wst.server.core.IServerWorkingCopy)
-	 */
-	public void initialize(IServerWorkingCopy workingCopy2) {
-		this.workingCopy = workingCopy2;
-	}
-	
-	public void setDefaults() {
-		setTestEnvironment(true);
-	}
-	
-	/**
-	 * Sets this process to debug mode. This feature only works
-	 * with Tomcat v4.0.
-	 *
-	 * @param b boolean
-	 */
-	public void setDebug(boolean b) {
-		workingCopy.setAttribute(PROPERTY_DEBUG, b);
-	}
-
-	/**
-	 * Sets this process to secure mode.
-	 * @param b boolean
-	 */
-	public void setSecure(boolean b) {
-		workingCopy.setAttribute(PROPERTY_SECURE, b);
-	}
-	
-	/**
-	 * Sets this server to test environment mode.
-	 * 
-	 * @param b boolean
-	 */
-	public void setTestEnvironment(boolean b) {
-		workingCopy.setAttribute(PROPERTY_TEST_ENVIRONMENT, b);
-	}
-	
-	/**
-	 * Add the given project to this configuration. The project
-	 * has already been verified using isSupportedProject() and
-	 * does not already exist in the configuration.
-	 *
-	 * @param ref java.lang.String
-	 */
-	public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
-		IStatus status = canModifyModules(add, remove);
-		if (status == null || !status.isOK())
-			throw new CoreException(status);
-		
-		IServerConfigurationWorkingCopy scwc = server.getServerConfiguration().getWorkingCopy();
-		// TODO
-		ITomcatConfigurationWorkingCopy wc = (ITomcatConfigurationWorkingCopy) scwc.getWorkingCopyDelegate();
-		boolean change = false;
-
-		if (add != null) {
-			int size = add.length;
-			for (int i = 0; i < size; i++) {
-				IModule module3 = add[i];
-				IWebModule module = (IWebModule) module3;
-				String contextRoot = module.getContextRoot();
-				if (contextRoot != null && !contextRoot.startsWith("/"))
-					contextRoot = "/" + contextRoot;
-				WebModule module2 = new WebModule(contextRoot,
-						module.getLocation().toOSString(), module.getFactoryId() + ":" + module.getId(), true);
-				wc.addWebModule(-1, module2);
-				change = true;
-			}
-		}
-		
-		if (remove != null) {
-			int size2 = remove.length;
-			for (int j = 0; j < size2; j++) {
-				IModule module3 = remove[j];
-				String memento = module3.getFactoryId() + ":" + module3.getId();
-				List modules = getTomcatConfiguration().getWebModules();
-				int size = modules.size();
-				for (int i = 0; i < size; i++) {
-					WebModule module = (WebModule) modules.get(i);
-					if (memento.equals(module.getMemento())) {
-						wc.removeWebModule(i);
-						change = true;
-					}
-				}
-			}
-		}
-		if (!change)
-			scwc.release();
-		else
-			scwc.save(new NullProgressMonitor());
-		server.setConfigurationSyncState(IServer.SYNC_STATE_DIRTY);
-	}
-	
-	public void handleSave(byte id, IProgressMonitor monitor) { }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatSourcePathComputerDelegate.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatSourcePathComputerDelegate.java
index a299b6e..0f4ff3c 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatSourcePathComputerDelegate.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatSourcePathComputerDelegate.java
@@ -1,6 +1,6 @@
 /**********************************************************************
  * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -24,10 +24,9 @@
 import org.eclipse.jdt.internal.launching.JavaSourceLookupUtil;
 import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
 import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.wst.server.core.IModule;
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.IModule;
-import org.eclipse.wst.server.core.model.IProjectModule;
 /**
  *
  */
@@ -40,21 +39,22 @@
 
 		String serverId = configuration.getAttribute(IServer.ATTR_SERVER_ID, (String) null);
 
-		IServer server = ServerCore.getResourceManager().getServer(serverId);
+		IServer server = ServerCore.findServer(serverId);
 		if (server != null) {
 			List list = new ArrayList();
 			List pathList = new ArrayList();
-			IModule[] modules = server.getModules();
+			IModule[] modules = server.getModules(monitor);
 			for (int i = 0; i < modules.length; i++) {
-				if (modules[i] instanceof IProjectModule) {
-					IProjectModule dp = (IProjectModule) modules[i];
-					IProject project = dp.getProject();
+				IProject project = modules[i].getProject();
+				if (project != null) {
 					try {
 						if (project.hasNature(JavaCore.NATURE_ID)) {
 							IJavaProject javaProject = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
 							list.add(javaProject);
 						}
-					} catch (Exception e) { }
+					} catch (Exception e) {
+						// ignore
+					}
 					
 					IPath path = server.getRuntime().getLocation().append("work").append("Catalina").append("localhost").append(modules[i].getName());
 					pathList.add(path);
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatWebModulePublisher.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatWebModulePublisher.java
deleted file mode 100644
index 705f24f..0000000
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatWebModulePublisher.java
+++ /dev/null
@@ -1,260 +0,0 @@
-package org.eclipse.jst.server.tomcat.core.internal;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *    IBM - Initial API and implementation
- **********************************************************************/
-import java.io.File;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.j2ee.IWebModule;
-
-import org.eclipse.wst.server.core.model.IPublisher;
-import org.eclipse.wst.server.core.resources.IModuleFile;
-import org.eclipse.wst.server.core.resources.IModuleFolder;
-import org.eclipse.wst.server.core.resources.IModuleResource;
-import org.eclipse.wst.server.core.resources.IRemoteResource;
-import org.eclipse.wst.server.core.resources.RemoteFolder;
-import org.eclipse.wst.server.core.resources.RemoteResource;
-import org.eclipse.wst.server.core.util.FileUtil;
-import org.eclipse.wst.server.core.util.ProgressUtil;
-/**
- * The Tomcat publisher for local (out of the workbench) resources.
- */
-public class TomcatWebModulePublisher implements IPublisher {
-	protected IWebModule module;
-	protected IPath installDir;
-
-	protected static final Status publishStatus = new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "Published successfully", null);
-	protected static final Status deleteStatus = new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "Deleted successfully", null);
-
-	/**
-	 * TomcatWebModulePublisher constructor comment.
-	 */
-	public TomcatWebModulePublisher(IWebModule module, IPath installDir) {
-		super();
-		this.module = module;
-		this.installDir = installDir;
-	}
-
-	/**
-	 * Delete the following files from the remote machine.
-	 *
-	 * @param file java.lang.String[]
-	 * @return org.eclipse.core.runtime.IStatus[]
-	 */
-	public IStatus[] delete(IRemoteResource[] resource, IProgressMonitor monitor) {
-		if (resource == null)
-			return null;
-
-		monitor = ProgressUtil.getMonitorFor(monitor);
-		monitor.beginTask(TomcatPlugin.getResource("%publishTask"), resource.length);
-
-		IPath root = getRemoteRoot().append(module.getContextRoot());
-
-		int size = resource.length;
-		IStatus[] status = new Status[size];
-		for (int i = 0; i < size; i++) {
-			if (monitor.isCanceled())
-				return status;
-
-			IPath path = resource[i].getPath();
-			IPath realPath = root.append(path);
-			File file = new File(realPath.toOSString());
-
-			monitor.subTask(TomcatPlugin.getResource("%publisherDeleteTask", new String[] {path.toString()}));
-			Trace.trace("Deleting " + realPath);
-			boolean b = file.delete();
-			if (b)
-				status[i] = new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "Delete " + realPath.toOSString() + " successfully", null);
-			else
-				status[i] = new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, "Could not delete " + realPath.toOSString(), null);
-
-			monitor.worked(1);
-		}
-		monitor.done();
-		return status;
-	}
-
-	/**
-	 * Returns the mapping of this file on the remote
-	 * system. Return null if this file should not be
-	 * copied to the remote server.
-	 *
-	 * @param resource org.eclipse.core.resources.IResource
-	 * @return org.eclipse.core.resources.IPath
-	 */
-	public IPath getMappedLocation(IModuleResource resource) {
-		return resource.getPath();
-	}
-
-	/**
-	 * Recursively builds a directory tree of the remote resources.
-	 *
-	 * @param path org.eclipse.core.runtime.IPath
-	 * @return java.util.List
-	 */
-	protected IRemoteResource[] getRemoteResources(RemoteFolder parent, File dir) {
-		List list = new ArrayList();
-
-		if (!dir.exists())
-			return null;
-
-		if (!dir.isDirectory())
-			return null;
-
-		File[] files = dir.listFiles();
-		if (files == null)
-			return null;
-
-		int size = files.length;
-		for (int i = 0; i < size; i++) {
-			File file = files[i];
-			if (file.isDirectory()) {
-				RemoteFolder folder = new RemoteFolder(parent, file.getName(), file.lastModified());
-				if (parent != null)
-					parent.addChild(folder);
-				getRemoteResources(folder, file);
-				list.add(folder);
-			} else {
-				IRemoteResource remote = new RemoteResource(parent, file.getName(), file.lastModified());
-				if (parent != null)
-					parent.addChild(remote);
-				list.add(remote);
-			}
-		}
-
-		IRemoteResource[] resources = new IRemoteResource[list.size()];
-		list.toArray(resources);
-		return resources;
-	}
-
-	/**
-	 * Returns a list of the remote resources at the root level.
-	 * These may be folders or resources. This method should not
-	 * return cached data.
-	 *
-	 * @return java.util.List
-	 */
-	public IRemoteResource[] getRemoteResources(IProgressMonitor monitor) {
-		File rootFile = getRemoteRoot().append(module.getContextRoot()).toFile();
-		if (rootFile.exists()) {
-			return getRemoteResources(null, rootFile);
-		}
-		return new IRemoteResource[0];
-	}
-
-	/**
-	 * Returns the root of the remote publishing location.
-	 *
-	 * @return org.eclipse.core.runtime.IPath
-	 */
-	protected IPath getRemoteRoot() {
-		return installDir.append("webapps");
-	}
-
-	/**
-	 * Returns true if there may be any files or folders within
-	 * this container that should be mapped to the remote system.
-	 * Returns false if files within this folder are never copied
-	 * to the remote system.
-	 *
-	 * @param container org.eclipse.core.resources.IContainer
-	 * @return boolean
-	 */
-	public boolean shouldMapMembers(IModuleFolder folder) {
-		return true;
-	}
-
-	/**
-	 * Publish the given files to the given location on the
-	 * remote machine.
-	 *
-	 * @param file java.lang.String[]
-	 * @return org.eclipse.core.runtime.IStatus[]
-	 */
-	public IStatus[] publish(IModuleResource[] resource, IProgressMonitor monitor) {
-		if (resource == null)
-			return null;
-
-		monitor = ProgressUtil.getMonitorFor(monitor);
-		monitor.beginTask(TomcatPlugin.getResource("%publishTask"), resource.length);
-
-		IPath root = getRemoteRoot().append(module.getContextRoot());
-	
-		// create context root directory if necessary
-		File temp = root.toFile();
-		if (!temp.exists())
-			temp.mkdirs();
-
-		int size = resource.length;
-		IStatus[] status = new Status[size];
-		for (int i = 0; i < size; i++) {
-			if (monitor.isCanceled())
-				return status;
-
-			//IPath fromPath = resource[i].getLocation();
-			IPath toPath = getMappedLocation(resource[i]);
-			IPath realToPath = root.append(toPath);
-
-			// copy file
-			monitor.subTask(TomcatPlugin.getResource("%publisherPublishTask", new String[] {toPath.toString()}));
-			Trace.trace("Publishing " + resource[i] + " -> " + realToPath);
-			if (resource[i] instanceof IModuleFolder) {
-				File f = new File(realToPath.toOSString());
-				if (f.exists() && f.isDirectory()) {
-					status[i] = new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "Directory " + realToPath.toOSString() + " already exists", null);
-				} else {
-					boolean b = f.mkdir();
-
-					if (b)
-						status[i] = new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, "Created " + realToPath.toOSString() + " successfully", null);
-					else
-						status[i] = new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, "Could not create directory " + realToPath.toOSString(), null);
-				}
-			} else if (resource[i] instanceof IModuleFile) {
-				IModuleFile file = (IModuleFile) resource[i];
-				InputStream in = null;
-				try {
-					in = file.getContents();
-					status[i] = FileUtil.copyFile(in, realToPath.toOSString());
-				} catch (Exception e) {
-					// FIX-ME
-				} finally {
-					if (in != null)
-						try {
-							in.close();
-						} catch (Exception e) { }
-				}
-			}
-			monitor.worked(1);
-		}
-
-		monitor.done();
-		return status;
-	}
-	
-	/**
-	 * Delete the entire module from the remote location.
-	 *
-	 * @param monitor org.eclipse.core.runtime.IProgressMonitor
-	 * @return org.eclipse.core.runtime.IStatus
-	 */
-	public IStatus deleteAll(IProgressMonitor monitor) {
-		IPath path = getRemoteRoot().append(module.getContextRoot());
-
-		FileUtil.deleteDirectory(path.toFile(), monitor);
-		return new Status(IStatus.OK, TomcatPlugin.PLUGIN_ID, 0, TomcatPlugin.getResource("%projectCleanupSuccess", module.getContextRoot()), null);
-	}
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Trace.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Trace.java
index 338cbf5..3f2d51a 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Trace.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Trace.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
 /**
  * Helper class to route trace output.
  */
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/WebAppDocument.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/WebAppDocument.java
index 4b59012..8f51978 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/WebAppDocument.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/WebAppDocument.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal;
+
 import java.io.ByteArrayInputStream;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -27,8 +28,6 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
-
-import org.eclipse.wst.server.core.util.ProgressUtil;
 /**
  * Helper class to access a web.xml file.
  */
@@ -122,16 +121,6 @@
 		element.removeChild(node);
 		isWebAppDirty = true;
 	}
-
-	/**
-	 * Saves the Web app document.
-	 *
-	 * @param filename java.lang.String
-	 */
-	/*public void save(String dirPath, boolean forceDirty) throws IOException {
-		if (forceDirty || isWebAppDirty)
-			XMLUtil.save(dirPath + "web.xml", webAppDocument);
-	}*/
 	
 	/**
 	 * Saves the Web app document.
@@ -158,11 +147,13 @@
 			else
 				file.create(in, true, ProgressUtil.getSubMonitorFor(monitor, 200));
 		} catch (Exception e) {
+			// ignore
 		} finally {
 			try {
 				in.close();
-			} catch (Exception e) { }
+			} catch (Exception e) {
+				// ignore
+			}
 		}
-		
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddMimeMappingCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddMimeMappingCommand.java
index 857b4ab..cabf6e6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddMimeMappingCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddMimeMappingCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.*;
 import org.eclipse.jst.server.tomcat.core.internal.*;
 /**
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddWebModuleCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddWebModuleCommand.java
index 8ba4c8f..a070d93 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddWebModuleCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddWebModuleCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.*;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
 /**
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ConfigurationCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ConfigurationCommand.java
index 517c134..fb1854e 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ConfigurationCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ConfigurationCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.wst.server.core.util.Task;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyMimeMappingCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyMimeMappingCommand.java
index 549494d..e255537 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyMimeMappingCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyMimeMappingCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.MimeMapping;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyPortCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyPortCommand.java
index 4915720..6664d07 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyPortCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyPortCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,11 +8,13 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import java.util.Iterator;
 
 import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
-import org.eclipse.wst.server.core.model.IServerPort;
+import org.eclipse.wst.server.core.IServerPort;
 /**
  * Command to change the configuration port.
  */
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyWebModuleCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyWebModuleCommand.java
index 4f470f7..d06341d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyWebModuleCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyWebModuleCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveMimeMappingCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveMimeMappingCommand.java
index 49ac07b..3e561ec 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveMimeMappingCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveMimeMappingCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.MimeMapping;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleCommand.java
index fca5d86..19156e7 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleTask.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleTask.java
index 4f70202..ae93c8d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleTask.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleTask.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,15 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfiguration;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.WebModule;
+import org.eclipse.jst.server.tomcat.core.internal.TomcatConfiguration;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
+import org.eclipse.jst.server.tomcat.core.internal.TomcatServer;
 
-import org.eclipse.wst.server.core.IServerConfiguration;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
 import org.eclipse.wst.server.core.ITaskModel;
 import org.eclipse.wst.server.core.util.Task;
 /**
@@ -40,8 +40,9 @@
 	 * @return boolean
 	 */
 	public void execute(IProgressMonitor monitor) throws CoreException {
-		IServerConfigurationWorkingCopy wc = (IServerConfigurationWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER_CONFIGURATION);
-		ITomcatConfigurationWorkingCopy configuration = (ITomcatConfigurationWorkingCopy) wc.getWorkingCopyDelegate();
+		IServerWorkingCopy wc = (IServerWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER);
+		TomcatServer server = (TomcatServer) wc.getAdapter(TomcatServer.class);
+		TomcatConfiguration configuration = server.getTomcatConfiguration();
 		module = (WebModule) configuration.getWebModules().get(index);
 		configuration.removeWebModule(index);
 	}
@@ -52,8 +53,9 @@
 	 */
 	public String getDescription() {
 		if (module == null) {
-			IServerConfiguration config = (IServerConfiguration) getTaskModel().getObject(ITaskModel.TASK_SERVER_CONFIGURATION);
-			ITomcatConfiguration configuration = (ITomcatConfiguration) config.getDelegate();
+			IServerWorkingCopy wc = (IServerWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER);
+			TomcatServer server = (TomcatServer) wc.getAdapter(TomcatServer.class);
+			TomcatConfiguration configuration = server.getTomcatConfiguration();
 			module = (WebModule) configuration.getWebModules().get(index);
 		}
 		return TomcatPlugin.getResource("%configurationEditorActionRemoveWebModuleDescription", module.getPath());
@@ -72,9 +74,12 @@
 	 */
 	public void undo() {
 		try {
-			IServerConfigurationWorkingCopy wc = (IServerConfigurationWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER_CONFIGURATION);
-			ITomcatConfigurationWorkingCopy configuration = (ITomcatConfigurationWorkingCopy) wc.getWorkingCopyDelegate();
+			IServerWorkingCopy wc = (IServerWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER);
+			TomcatServer server = (TomcatServer) wc.getAdapter(TomcatServer.class);
+			TomcatConfiguration configuration = server.getTomcatConfiguration();
 			configuration.addWebModule(index, module);
-		} catch (Exception e) { }
+		} catch (Exception e) {
+			// ignore
+		}
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ServerCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ServerCommand.java
index 38eed7b..8bf10e6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ServerCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ServerCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jst.server.tomcat.core.ITomcatServerWorkingCopy;
 import org.eclipse.wst.server.core.util.Task;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetDebugModeCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetDebugModeCommand.java
index 944bb0e..35dabc2 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetDebugModeCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetDebugModeCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatServerWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
 /**
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetSecureCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetSecureCommand.java
index 2e381bf..2386ed4 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetSecureCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetSecureCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatServerWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
 /**
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetTestEnvironmentCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetTestEnvironmentCommand.java
index 365effb..faae3a0 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetTestEnvironmentCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetTestEnvironmentCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatServerWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
 /**
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathCommand.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathCommand.java
index ab778f7..b056932 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathCommand.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathCommand.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathTask.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathTask.java
index 332112d..0ac8c1b 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathTask.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathTask.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.command;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,15 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.command;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfiguration;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.WebModule;
+import org.eclipse.jst.server.tomcat.core.internal.TomcatConfiguration;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
+import org.eclipse.jst.server.tomcat.core.internal.TomcatServer;
 
-import org.eclipse.wst.server.core.IServerConfiguration;
-import org.eclipse.wst.server.core.IServerConfigurationWorkingCopy;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
 import org.eclipse.wst.server.core.ITaskModel;
 import org.eclipse.wst.server.core.util.Task;
 /**
@@ -36,14 +36,15 @@
 		this.index = index;
 		this.path = contextRoot;
 	}
-	
+
 	/**
 	 * Execute the command.
 	 * @return boolean
 	 */
 	public void execute(IProgressMonitor monitor) throws CoreException {
-		IServerConfigurationWorkingCopy wc = (IServerConfigurationWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER_CONFIGURATION);
-		ITomcatConfigurationWorkingCopy configuration = (ITomcatConfigurationWorkingCopy) wc.getWorkingCopyDelegate();
+		IServerWorkingCopy wc = (IServerWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER);
+		TomcatServer server = (TomcatServer) wc.getAdapter(TomcatServer.class);
+		TomcatConfiguration configuration = server.getTomcatConfiguration();
 		oldModule = (WebModule) configuration.getWebModules().get(index);
 		configuration.removeWebModule(index);
 		
@@ -57,8 +58,9 @@
 	 */
 	public String getDescription() {
 		if (oldModule == null) {
-			IServerConfiguration config = (IServerConfiguration) getTaskModel().getObject(ITaskModel.TASK_SERVER_CONFIGURATION);
-			ITomcatConfiguration configuration = (ITomcatConfiguration) config.getDelegate();
+			IServerWorkingCopy wc = (IServerWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER);
+			TomcatServer server = (TomcatServer) wc.getAdapter(TomcatServer.class);
+			TomcatConfiguration configuration = server.getTomcatConfiguration();
 			oldModule = (WebModule) configuration.getWebModules().get(index);
 		}
 		
@@ -78,10 +80,13 @@
 	 */
 	public void undo() {
 		try {
-			IServerConfigurationWorkingCopy wc = (IServerConfigurationWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER_CONFIGURATION);
-			ITomcatConfigurationWorkingCopy configuration = (ITomcatConfigurationWorkingCopy) wc.getWorkingCopyDelegate();
+			IServerWorkingCopy wc = (IServerWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_SERVER);
+			TomcatServer server = (TomcatServer) wc.getAdapter(TomcatServer.class);
+			TomcatConfiguration configuration = server.getTomcatConfiguration();
 			configuration.removeWebModule(index);
 			configuration.addWebModule(index, oldModule);
-		} catch (Exception e) { }
+		} catch (Exception e) {
+			// ignore
+		}
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/Factory.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/Factory.java
index 9c82af9..b3be98d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/Factory.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/Factory.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml;
+
 import java.io.*;
 
 import org.w3c.dom.*;
@@ -18,15 +19,13 @@
 /**
  * Factory for reading and writing from XML files.
  */
-public class Factory implements Serializable {
-
-
-	private static final long serialVersionUID = 1L;
-	
+public class Factory {
 	protected String packageName;
 	protected Document document;
 
-	public Factory() { }
+	public Factory() {
+		// do nothing
+	}
 	
 	protected Attr createAttribute(String s, Element element) {
 		Attr attr = document.createAttribute(s);
@@ -106,11 +105,13 @@
 				s = packageName + "." + s;
 			Class class1 = Class.forName(s);
 	
-			XMLElement ibmxmlelement = (XMLElement) class1.newInstance();
-			ibmxmlelement.setElement(element);
-			ibmxmlelement.setFactory(this);
-			return ibmxmlelement;
-		} catch (Exception exception) { }
+			XMLElement xmlElement = (XMLElement) class1.newInstance();
+			xmlElement.setElement(element);
+			xmlElement.setFactory(this);
+			return xmlElement;
+		} catch (Exception exception) {
+			// ignore
+		}
 		return null;
 	}
 	
@@ -125,4 +126,4 @@
 	public void setPackageName(String s) {
 		packageName = s;
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLElement.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLElement.java
index 2e9ee79..76b4821 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLElement.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLElement.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,18 +8,19 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import java.io.Serializable;
+package org.eclipse.jst.server.tomcat.core.internal.xml;
+
 import org.w3c.dom.*;
 /**
  * An XML element.
  */
-public class XMLElement implements Serializable {
-
-	private static final long serialVersionUID = 1L;
+public class XMLElement {
 	private Element xmlElement;
 	protected Factory factory;
 
-	public XMLElement() { }
+	public XMLElement() {
+		// do nothing
+	}
 
 	public Attr addAttribute(String s, String s1) {
 		Attr attr = factory.createAttribute(s, xmlElement);
@@ -36,9 +36,6 @@
 		return factory.createElement(s, xmlElement);
 	}
 
-	public void createEmptyBody() {
-	}
-
 	public XMLElement findElement(String s) {
 		NodeList nodelist = xmlElement.getElementsByTagName(s);
 		int i = nodelist == null ? 0 : nodelist.getLength();
@@ -208,4 +205,4 @@
 			}
 		}
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLUtil.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLUtil.java
index 421b297..d1b41a1 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLUtil.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLUtil.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml;
+
 import java.io.*;
 import java.util.*;
 
@@ -112,7 +113,9 @@
 			if (out != null)
 				try {
 					out.close();
-				} catch (Exception e) { }
+				} catch (Exception e) {
+					// ignore
+				}
 		}
 	}
 
@@ -331,7 +334,9 @@
 			if (out != null)
 				try {
 					out.close();
-				} catch (Exception e) { }
+				} catch (Exception e) {
+					// ignore
+				}
 		}
 	}
 
@@ -367,11 +372,14 @@
 			print(out, document);
 			return new String(baos.toByteArray());
 		} catch (Exception ex) {
+			// ignore
 		} finally {
 			if (out != null)
 				try {
 					out.close();
-				} catch (Exception e) { }
+				} catch (Exception e) {
+					// ignore
+				}
 		}
 		return null;
 	}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Connector.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Connector.java
index e014b9d..43d980b 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Connector.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Connector.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Connector extends XMLElement {
-	public Connector() { }
+	public Connector() {
+		// do nothing
+	}
 	
 	public String getClassName() {
 		return getAttributeValue("className");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Context.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Context.java
index 7157981..a371fa6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Context.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Context.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Context extends XMLElement {
-	public Context() { }
+	public Context() {
+		// do nothing
+	}
 	
 	public String getCrossContext() {
 		return getAttributeValue("crossContext");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/ContextManager.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/ContextManager.java
index 0913c3a..7a910a6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/ContextManager.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/ContextManager.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class ContextManager extends XMLElement {
-	public ContextManager() { }
+	public ContextManager() {
+		// do nothing
+	}
 	
 	public Connector getConnector(int index) {
 		return (Connector) findElement("Connector", index);
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Parameter.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Parameter.java
index ca73ec8..56ca74d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Parameter.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Parameter.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Parameter extends XMLElement {
-	public Parameter() { }
+	public Parameter() {
+		// do nothing
+	}
 	
 	public String getName() {
 		return getAttributeValue("name");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Server.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Server.java
index 2011fa4..1c173ca 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Server.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Server.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server32;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Server extends XMLElement {
-	public Server() { }
+	public Server() {
+		// do nothing
+	}
 	
 	public ContextManager getContextManager() {
 		return (ContextManager) findElement("ContextManager");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Connector.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Connector.java
index f89e0f5..8ba1949 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Connector.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Connector.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Connector extends XMLElement {
-	public Connector() { }
+	public Connector() {
+		// do nothing
+	}
 
 	public String getAcceptCount() {
 		return getAttributeValue("acceptCount");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Context.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Context.java
index ffbb584..95abb58 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Context.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Context.java
@@ -1,6 +1,5 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Context extends XMLElement {
-	public Context() { }
+	public Context() {
+		// do nothing
+	}
 
 	public String getDebug() {
 		return getAttributeValue("debug");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Engine.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Engine.java
index ed7acd6..bd3903d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Engine.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Engine.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Engine extends XMLElement {
-	public Engine() { }
+	public Engine() {
+		// do nothing
+	}
 	
 	public String getAppBase() {
 		return getAttributeValue("appBase");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Host.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Host.java
index b3996df..b993d33 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Host.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Host.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Host extends XMLElement {
-	public Host() { }
+	public Host() {
+		// do nothing
+	}
 	
 	public String getAppBase() {
 		return getAttributeValue("appBase");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Listener.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Listener.java
index a8f9061..c2fa008 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Listener.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Listener.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Listener extends XMLElement {
-	public Listener() { }
+	public Listener() {
+		// do nothing
+	}
 
 	public String getClassName() {
 		return getAttributeValue("className");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Server.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Server.java
index cc73793..2573f16 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Server.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Server.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Server extends XMLElement {
-	public Server() { }
+	public Server() {
+		// do nothing
+	}
 
 	public String getDebug() {
 		return getAttributeValue("debug");
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Service.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Service.java
index 99499ed..728b949 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Service.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Service.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,12 +8,16 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.core.internal.xml.server40;
+
 import org.eclipse.jst.server.tomcat.core.internal.xml.*;
 /**
  * 
  */
 public class Service extends XMLElement {
-	public Service() { }
+	public Service() {
+		// do nothing
+	}
 
 	public Connector getConnector(int index) {
 		return (Connector) findElement("Connector", index);
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/verifyInstall.properties b/plugins/org.eclipse.jst.server.tomcat.core/verifyInstall.properties
index 9434b15..ebbd84c 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/verifyInstall.properties
+++ b/plugins/org.eclipse.jst.server.tomcat.core/verifyInstall.properties
@@ -1,4 +1,5 @@
 verify32install=lib/jasper.jar,lib/servlet.jar,bin,conf,webapps
 verify40install=bin/bootstrap.jar,conf,webapps
 verify41install=bin/bootstrap.jar,conf,webapps
-verify50install=bin/bootstrap.jar,conf,webapps
\ No newline at end of file
+verify50install=bin/bootstrap.jar,conf,webapps
+verify55install=bin/bootstrap.jar,conf,webapps
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/server_55.gif b/plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/server_55.gif
new file mode 100644
index 0000000..0cac53e
--- /dev/null
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/server_55.gif
Binary files differ
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/plugin.properties b/plugins/org.eclipse.jst.server.tomcat.ui/plugin.properties
index 90269da..01fa562 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/plugin.properties
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/plugin.properties
@@ -13,27 +13,18 @@
 
 # --------------- Editors ---------------
 
-editorName=Tomcat Server Editor
-
 # General text used in both editors
 editorRemove=Remove
 editorAdd=Add...
 editorEdit=Edit...
-editorBrowse=Browse...
 
 # --- Configuration Editor ---
 configurationEditorWebModulesPage=Modules
 configurationEditorWebModulesPageTitle=Web Modules
 configurationEditorWebModulesSection=Web Modules
 configurationEditorWebModulesDescription=Configure the Web Modules on this server.
-configurationEditorMimeMappingsPage=Mappings
-configurationEditorMimeMappingsPageTitle=MIME Mappings
 configurationEditorMimeMappingsSection=MIME Mappings
 configurationEditorMimeMappingsDescription=Configure MIME type mappings.
-configurationEditorPortsPage=Configuration
-configurationEditorPortsPageTitle=Tomcat Server Configuration
-configurationEditorNameSection=Server Configuration
-configurationEditorNameDescription=Enter settings for the server configuration.
 configurationEditorPortsSection=Ports
 configurationEditorPortsDescription=Modify the server ports.
 
@@ -68,8 +59,6 @@
 
 
 # --- Server Editor ---
-serverEditorGeneralPage=Server
-serverEditorGeneralPageTitle=Tomcat Server
 serverEditorGeneralSection=Server
 serverEditorGeneralDescription=Enter settings for the server.
 
@@ -78,14 +67,6 @@
 serverEditorDebugMode=Enable Tomcat debug mode (v4.x and above only)
 serverEditorTestEnvironment=Run modules directly from the workspace (do not modify the Tomcat installation)
 
-# Actions (used in undo/redo menus)
-serverEditorActionSetSecure=set security
-serverEditorActionSetSecureDescription=Set the Tomcat security
-serverEditorActionSetDebugMode=set Tomcat debug mode
-serverEditorActionSetDebugModeDescription=Set Tomcat in debug mode
-serverEditorActionSetTestEnvironment=run modules from workspace
-serverEditorActionSetTestEnvironmentDescription=Run modules from the workspace
-
 
 # --------------- General UI ---------------
 
@@ -99,12 +80,3 @@
 # New Tomcat server wizard
 wizardTitle=Tomcat Server
 wizardDescription=Specify the installation directory
-
-
-# --------------- Errors and Info ---------------
-errorTitle=Tomcat Error
-errorInstallDir=The Tomcat installation directory is not correct. Edit the server and change the installation directory.
-errorJRE=The JRE could not be found. Edit the server and change the JRE location.
-errorDefaultInstallDir=Cannot create a Tomcat server because the installation directory is not known. Enter the installation directory in the Tomcat preferences.
-errorCancelled=Cancelled
-errorNameContainsWhitespace=Name should not begin or end with whitespace.
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/plugin.xml b/plugins/org.eclipse.jst.server.tomcat.ui/plugin.xml
index f5e4dec..9a3565e 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/plugin.xml
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/plugin.xml
@@ -3,58 +3,51 @@
 
 <plugin id="org.eclipse.jst.server.tomcat.ui"
    name="%pluginName"
-   version="3.0.0"
+   version="1.0.0"
    provider-name="%providerName"
    class="org.eclipse.jst.server.tomcat.ui.internal.TomcatUIPlugin">
 
    <runtime>
       <library name="tomcatui.jar">
          <export name="*"/>
-         <packages prefixes="org.eclipse.jst.server.tomcat.ui"/>
       </library>
    </runtime>
 
    <requires>
-      <import plugin="org.eclipse.core.runtime" />
-      <import plugin="org.eclipse.core.resources" />
-      <import plugin="org.eclipse.ui" />
-      <import plugin="org.eclipse.ui.ide" />
-      <import plugin="org.eclipse.ui.editors" />
-      <import plugin="org.eclipse.ui.forms" />
-      <import plugin="org.eclipse.debug.core" />
-      <import plugin="org.eclipse.debug.ui" />
-      <import plugin="org.eclipse.jdt.core" />
-      <import plugin="org.eclipse.jdt.debug" />
-      <import plugin="org.eclipse.jdt.debug.ui" />
-      <import plugin="org.eclipse.jdt.launching" />
-      <import plugin="org.eclipse.wst.server.core" />
-      <import plugin="org.eclipse.wst.server.ui" />
-      <import plugin="org.eclipse.jst.server.core" />
-      <import plugin="org.eclipse.jst.server.ui" />
-      <import plugin="org.eclipse.jst.server.tomcat.core" />
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.ui.forms"/>
+      <import plugin="org.eclipse.debug.ui"/>
+      <import plugin="org.eclipse.jdt.debug.ui"/>
+      <import plugin="org.eclipse.jdt.launching"/>
+      <import plugin="org.eclipse.wst.server.core"/>
+      <import plugin="org.eclipse.wst.server.ui"/>
+      <import plugin="org.eclipse.jst.server.core"/>
+      <import plugin="org.eclipse.jst.server.tomcat.core"/>
    </requires>
 
    <extension point="org.eclipse.wst.server.ui.serverImages">
       <image
          id="org.eclipse.jst.server.tomcat.32"
          icon="icons/obj16/server_32.gif"
-         typeIds="org.eclipse.jst.server.tomcat.32.runtime"/>
+         typeIds="org.eclipse.jst.server.tomcat.runtime.32"/>
       <image
          id="org.eclipse.jst.server.tomcat.40"
          icon="icons/obj16/server_40.gif"
-         typeIds="org.eclipse.jst.server.tomcat.40.runtime"/>
+         typeIds="org.eclipse.jst.server.tomcat.runtime.40"/>
       <image
          id="org.eclipse.jst.server.tomcat.41"
          icon="icons/obj16/server_41.gif"
-         typeIds="org.eclipse.jst.server.tomcat.41.runtime"/>
+         typeIds="org.eclipse.jst.server.tomcat.runtime.41"/>
       <image
          id="org.eclipse.jst.server.tomcat.50"
          icon="icons/obj16/server_50.gif"
-         typeIds="org.eclipse.jst.server.tomcat.50.runtime"/>
+         typeIds="org.eclipse.jst.server.tomcat.runtime.50"/>
       <image
          id="org.eclipse.jst.server.tomcat.55"
          icon="icons/obj16/server_55.gif"
-         typeIds="org.eclipse.jst.server.tomcat.55.runtime"/>
+         typeIds="org.eclipse.jst.server.tomcat.runtime.55"/>
 
       <image
          id="org.eclipse.jst.server.tomcat.32"
@@ -110,24 +103,24 @@
    
    <extension point="org.eclipse.wst.server.ui.wizardFragments">
       <fragment
-         id="org.eclipse.jst.server.tomcat.32.runtime"
-         typeIds="org.eclipse.jst.server.tomcat.32.runtime"
+         id="org.eclipse.jst.server.tomcat.runtime.32"
+         typeIds="org.eclipse.jst.server.tomcat.runtime.32"
          class="org.eclipse.jst.server.tomcat.ui.internal.TomcatRuntimeWizardFragment"/>
       <fragment
-         id="org.eclipse.jst.server.tomcat.40.runtime"
-         typeIds="org.eclipse.jst.server.tomcat.40.runtime"
+         id="org.eclipse.jst.server.tomcat.runtime.40"
+         typeIds="org.eclipse.jst.server.tomcat.runtime.40"
          class="org.eclipse.jst.server.tomcat.ui.internal.TomcatRuntimeWizardFragment"/>
       <fragment
-         id="org.eclipse.jst.server.tomcat.41.runtime"
-         typeIds="org.eclipse.jst.server.tomcat.41.runtime"
+         id="org.eclipse.jst.server.tomcat.runtime.41"
+         typeIds="org.eclipse.jst.server.tomcat.runtime.41"
          class="org.eclipse.jst.server.tomcat.ui.internal.TomcatRuntimeWizardFragment"/>
       <fragment
-         id="org.eclipse.jst.server.tomcat.50.runtime"
-         typeIds="org.eclipse.jst.server.tomcat.50.runtime"
+         id="org.eclipse.jst.server.tomcat.runtime.50"
+         typeIds="org.eclipse.jst.server.tomcat.runtime.50"
          class="org.eclipse.jst.server.tomcat.ui.internal.TomcatRuntimeWizardFragment"/>
       <fragment
-         id="org.eclipse.jst.server.tomcat.55.runtime"
-         typeIds="org.eclipse.jst.server.tomcat.55.runtime"
+         id="org.eclipse.jst.server.tomcat.runtime.55"
+         typeIds="org.eclipse.jst.server.tomcat.runtime.55"
          class="org.eclipse.jst.server.tomcat.ui.internal.TomcatRuntimeWizardFragment"/>
    </extension>
    
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/ContextIds.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/ContextIds.java
index 9279b0d..98536bd 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/ContextIds.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/ContextIds.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal;
 /**
  * Constant ids for context help.
  */
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/SWTUtil.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/SWTUtil.java
index 4de2a3e..38a80a0 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/SWTUtil.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/SWTUtil.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.resource.JFaceResources;
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatLaunchConfigurationTabGroup.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatLaunchConfigurationTabGroup.java
index 6fbb49d..b530b70 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatLaunchConfigurationTabGroup.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatLaunchConfigurationTabGroup.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal;
+
 import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
 import org.eclipse.debug.ui.CommonTab;
 import org.eclipse.debug.ui.EnvironmentTab;
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeComposite.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeComposite.java
index ff02805..5fbc164 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeComposite.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeComposite.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -24,7 +25,6 @@
 import org.eclipse.jface.preference.PreferenceManager;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jst.server.tomcat.core.ITomcatRuntimeWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.internal.TomcatRuntimeWorkingCopy;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.events.ModifyEvent;
@@ -82,7 +82,7 @@
 			runtime = null;
 		} else {
 			runtimeWC = newRuntime;
-			runtime = (TomcatRuntimeWorkingCopy) newRuntime.getWorkingCopyDelegate();
+			runtime = (ITomcatRuntimeWorkingCopy) newRuntime.getAdapter(ITomcatRuntimeWorkingCopy.class);
 		}
 		
 		init();
@@ -164,7 +164,7 @@
 			public void widgetSelected(SelectionEvent e) {
 				int sel = combo.getSelectionIndex();
 				IVMInstall vmInstall = (IVMInstall) installedJREs.get(sel);
-				runtime.setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
+				runtime.setVMInstall(vmInstall);
 				validate();
 			}
 
@@ -256,8 +256,7 @@
 		int size = installedJREs.size();
 		for (int i = 0; i < size; i++) {
 			IVMInstall vmInstall = (IVMInstall) installedJREs.get(i);
-			if (vmInstall.getVMInstallType().getId().equals(runtime.getVMInstallTypeId())
-					&& vmInstall.getId().equals(runtime.getVMInstallId())) {
+			if (vmInstall.equals(runtime.getVMInstall())) {
 				combo.select(i);
 				found = true;
 			}
@@ -272,7 +271,7 @@
 			return;
 		}
 
-		IStatus status = runtime.validate();
+		IStatus status = runtimeWC.validate(null);
 		if (status == null || status.isOK())
 			wizard.setMessage(null, IMessageProvider.NONE);
 		else
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeWizardFragment.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeWizardFragment.java
index eb4fb6b..001db8c 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeWizardFragment.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeWizardFragment.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,9 +8,10 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal;
+
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.server.tomcat.core.ITomcatRuntimeWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
 import org.eclipse.swt.widgets.Composite;
 
@@ -25,7 +25,9 @@
 public class TomcatRuntimeWizardFragment extends WizardFragment {
 	protected TomcatRuntimeComposite comp;
 	
-	public TomcatRuntimeWizardFragment() { }
+	public TomcatRuntimeWizardFragment() {
+		// do nothing
+	}
 
 	public boolean hasComposite() {
 		return true;
@@ -36,7 +38,7 @@
 		
 		if (runtime == null)
 			return false;
-		IStatus status = runtime.validate();
+		IStatus status = runtime.validate(null);
 		return (status != null && status.isOK());
 	}
 
@@ -58,8 +60,7 @@
 	public void exit() {
 		IRuntimeWorkingCopy runtime = (IRuntimeWorkingCopy) getTaskModel().getObject(ITaskModel.TASK_RUNTIME);
 		IPath path = runtime.getLocation();
-		ITomcatRuntimeWorkingCopy tr = (ITomcatRuntimeWorkingCopy) runtime.getWorkingCopyDelegate();
-		if (tr.validate().isOK())
+		if (runtime.validate(null).isOK())
 			TomcatPlugin.setPreference("location" + runtime.getRuntimeType().getId(), path.toString());
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatUIPlugin.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatUIPlugin.java
index 53fe87d..e43a2e6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatUIPlugin.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatUIPlugin.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal;
+
 import java.net.URL;
 import java.text.MessageFormat;
 import java.util.HashMap;
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/Trace.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/Trace.java
index b9f1fbe..0fed098 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/Trace.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/Trace.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal;
 /**
  * Helper class to route trace output.
  */
@@ -68,4 +68,4 @@
 	public static void trace(String s, Throwable t) {
 		trace(FINEST, s, t);
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSection.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSection.java
index f89622e..aab3835 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSection.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSection.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
 import java.beans.*;
 import java.util.HashMap;
 import java.util.List;
@@ -23,9 +24,9 @@
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeItem;
 import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.MimeMapping;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatConfiguration;
+import org.eclipse.jst.server.tomcat.core.internal.TomcatServer;
 import org.eclipse.jst.server.tomcat.core.internal.command.*;
 import org.eclipse.jst.server.tomcat.ui.internal.ContextIds;
 import org.eclipse.jst.server.tomcat.ui.internal.TomcatUIPlugin;
@@ -37,8 +38,8 @@
 /**
  * Tomcat configuration mime editor section.
  */
-public class ConfigurationMimeEditorSection extends ServerResourceEditorSection {
-	protected ITomcatConfigurationWorkingCopy tomcatConfiguration;
+public class ConfigurationMimeEditorSection extends ServerEditorSection {
+	protected TomcatConfiguration tomcatConfiguration;
 
 	protected boolean updating;
 
@@ -78,7 +79,7 @@
 				}
 			}
 		};
-		serverConfiguration.addPropertyChangeListener(listener);
+		tomcatConfiguration.addPropertyChangeListener(listener);
 	}
 
 	public void createSection(Composite parent) {
@@ -183,17 +184,16 @@
 	}
 	
 	public void dispose() {
-		if (serverConfiguration != null)
-			serverConfiguration.removePropertyChangeListener(listener);
+		if (tomcatConfiguration != null)
+			tomcatConfiguration.removePropertyChangeListener(listener);
 	}
 
 	public void init(IEditorSite site, IEditorInput input) {
 		super.init(site, input);
 		
-		if (serverConfiguration != null) {
-			tomcatConfiguration = (ITomcatConfigurationWorkingCopy) serverConfiguration.getWorkingCopyDelegate();
-			addChangeListener();
-		}
+		TomcatServer ts = (TomcatServer) server.getAdapter(TomcatServer.class);
+		tomcatConfiguration = ts.getTomcatConfiguration();
+		addChangeListener();
 		initialize();
 	}
 
@@ -259,9 +259,6 @@
 		}
 	}
 	
-	protected void validate() {
-	}
-	
 	/**
 	 * Add a mime mapping.
 	 * 
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSectionFactory.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSectionFactory.java
index e5cefe1..f00f4a6 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSectionFactory.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationMimeEditorSectionFactory.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,22 +8,25 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerConfiguration;
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
+import org.eclipse.jst.server.tomcat.core.ITomcatServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
 import org.eclipse.wst.server.ui.editor.*;
 /**
  *
  */
-public class ConfigurationMimeEditorSectionFactory implements IServerEditorPageSectionFactoryDelegate {
+public class ConfigurationMimeEditorSectionFactory extends ServerEditorPageSectionFactoryDelegate {
 	/*
-	 * @see IServerEditorPartFactoryDelegate#shouldDisplay(IServer, IServerConfiguration)
+	 * @see ServerEditorPartFactoryDelegate#shouldDisplay(IServer)
 	 */
-	public boolean shouldCreateSection(IServer server, IServerConfiguration configuration) {
-		return (configuration != null);
+	public boolean shouldCreateSection(IServerWorkingCopy server) {
+		ITomcatServer tomcatServer = (ITomcatServer) server.getAdapter(ITomcatServer.class);
+		return tomcatServer.getServerConfiguration() != null;
 	}
 
 	/*
-	 * @see IServerEditorPartFactoryDelegate#createPage()
+	 * @see ServerEditorPartFactoryDelegate#createPage()
 	 */
 	public IServerEditorSection createSection() {
 		return new ConfigurationMimeEditorSection();
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSection.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSection.java
index 88d1e23..39c36ec 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSection.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSection.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,10 +8,12 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
 import java.beans.*;
 import java.util.Iterator;
 
-import org.eclipse.wst.server.core.model.IServerPort;
+import org.eclipse.wst.server.core.IServerPort;
 import org.eclipse.wst.server.core.util.ServerPort;
 import org.eclipse.wst.server.ui.editor.*;
 import org.eclipse.swt.SWT;
@@ -24,8 +25,8 @@
 import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.jface.viewers.*;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatConfiguration;
+import org.eclipse.jst.server.tomcat.core.internal.TomcatServer;
 import org.eclipse.jst.server.tomcat.core.internal.command.*;
 import org.eclipse.jst.server.tomcat.ui.internal.ContextIds;
 import org.eclipse.jst.server.tomcat.ui.internal.TomcatUIPlugin;
@@ -37,8 +38,8 @@
 /**
  * Tomcat configuration port editor page.
  */
-public class ConfigurationPortEditorSection extends ServerResourceEditorSection {
-	protected ITomcatConfigurationWorkingCopy tomcatConfiguration;
+public class ConfigurationPortEditorSection extends ServerEditorSection {
+	protected TomcatConfiguration tomcatConfiguration;
 
 	protected boolean updating;
 
@@ -67,7 +68,7 @@
 				}
 			}
 		};
-		serverConfiguration.addPropertyChangeListener(listener);
+		tomcatConfiguration.addPropertyChangeListener(listener);
 	}
 	
 	/**
@@ -167,7 +168,9 @@
 					IServerPort sp = (IServerPort) item.getData();
 					int port = Integer.parseInt((String) value);
 					commandManager.executeCommand(new ModifyPortCommand(tomcatConfiguration, sp.getId(), port));
-				} catch (Exception ex) { }
+				} catch (Exception ex) {
+					// ignore
+				}
 			}
 		};
 		viewer.setCellModifier(cellModifier);
@@ -180,38 +183,28 @@
 					try {
 						int n = ports.getSelectionIndex();
 						viewer.editElement(ports.getItem(n).getData(), 1);
-					} catch (Exception e) { }
+					} catch (Exception e) {
+						// ignore
+					}
 				}
 			});
 		}
 	}
 	
 	public void dispose() {
-		if (serverConfiguration != null)
-			serverConfiguration.removePropertyChangeListener(listener);
+		if (tomcatConfiguration != null)
+			tomcatConfiguration.removePropertyChangeListener(listener);
 	}
 	
 	/* (non-Javadoc)
 	 * Initializes the editor part with a site and input.
-	 * <p>
-	 * Subclasses of <code>EditorPart</code> must implement this method.  Within
-	 * the implementation subclasses should verify that the input type is acceptable
-	 * and then save the site and input.  Here is sample code:
-	 * </p>
-	 * <pre>
-	 *		if (!(input instanceof IFileEditorInput))
-	 *			throw new PartInitException("Invalid Input: Must be IFileEditorInput");
-	 *		setSite(site);
-	 *		setInput(editorInput);
-	 * </pre>
 	 */
 	public void init(IEditorSite site, IEditorInput input) {
 		super.init(site, input);
 		
-		if (serverConfiguration != null) {
-			tomcatConfiguration = (ITomcatConfigurationWorkingCopy) serverConfiguration.getWorkingCopyDelegate();
-			addChangeListener();
-		}
+		TomcatServer ts = (TomcatServer) server.getAdapter(TomcatServer.class);
+		tomcatConfiguration = ts.getTomcatConfiguration(); 
+		addChangeListener();
 		initialize();
 	}
 
@@ -241,6 +234,4 @@
 			setupPortEditors();
 		}
 	}
-	
-	protected void validate() { }
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSectionFactory.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSectionFactory.java
index d95de26..b21779e 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSectionFactory.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationPortEditorSectionFactory.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,22 +8,25 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerConfiguration;
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
+import org.eclipse.jst.server.tomcat.core.ITomcatServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
 import org.eclipse.wst.server.ui.editor.*;
 /**
  *
  */
-public class ConfigurationPortEditorSectionFactory implements IServerEditorPageSectionFactoryDelegate {
+public class ConfigurationPortEditorSectionFactory extends ServerEditorPageSectionFactoryDelegate {
 	/*
-	 * @see IServerEditorPartFactoryDelegate#shouldDisplay(IServer, IServerConfiguration)
+	 * @see ServerEditorPartFactoryDelegate#shouldDisplay(IServer)
 	 */
-	public boolean shouldCreateSection(IServer server, IServerConfiguration configuration) {
-		return (configuration != null);
+	public boolean shouldCreateSection(IServerWorkingCopy server) {
+		ITomcatServer tomcatServer = (ITomcatServer) server.getAdapter(ITomcatServer.class);
+		return tomcatServer.getServerConfiguration() != null;
 	}
 
 	/*
-	 * @see IServerEditorPartFactoryDelegate#createPage()
+	 * @see ServerEditorPartFactoryDelegate#createPage()
 	 */
 	public IServerEditorSection createSection() {
 		return new ConfigurationPortEditorSection();
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorFactory.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorFactory.java
index aed4284..1991b66 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorFactory.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorFactory.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,26 +8,29 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
+import org.eclipse.jst.server.tomcat.core.ITomcatServer;
 import org.eclipse.ui.IEditorPart;
 
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerConfiguration;
-import org.eclipse.wst.server.ui.editor.IServerEditorPartFactoryDelegate;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.ui.editor.ServerEditorPartFactoryDelegate;
 /**
  *
  */
-public class ConfigurationWebModuleEditorFactory implements IServerEditorPartFactoryDelegate {
+public class ConfigurationWebModuleEditorFactory extends ServerEditorPartFactoryDelegate {
 	/*
-	 * @see IServerEditorPartFactoryDelegate#shouldDisplay(IServer, IServerConfiguration)
+	 * @see ServerEditorPartFactoryDelegate#shouldDisplay(IServer)
 	 */
-	public boolean shouldCreatePage(IServer server, IServerConfiguration configuration) {
-		return (server != null && configuration != null);
+	public boolean shouldCreatePage(IServerWorkingCopy server) {
+		ITomcatServer tomcatServer = (ITomcatServer) server.getAdapter(ITomcatServer.class);
+		return tomcatServer.getServerConfiguration() != null;
 	}
 
 	/*
-	 * @see IServerEditorPartFactoryDelegate#createPage()
+	 * @see ServerEditorPartFactoryDelegate#createPage()
 	 */
 	public IEditorPart createPage() {
 		return new ConfigurationWebModuleEditorPart();
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorPart.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorPart.java
index c7602ef..289719b 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorPart.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorPart.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.util.Iterator;
@@ -19,10 +20,10 @@
 import org.eclipse.jface.viewers.ColumnWeightData;
 import org.eclipse.jface.viewers.TableLayout;
 import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.jst.server.tomcat.core.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.ITomcatServerWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.WebModule;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatConfiguration;
+import org.eclipse.jst.server.tomcat.core.internal.TomcatServer;
 import org.eclipse.jst.server.tomcat.core.internal.command.AddWebModuleCommand;
 import org.eclipse.jst.server.tomcat.core.internal.command.ModifyWebModuleCommand;
 import org.eclipse.jst.server.tomcat.core.internal.command.RemoveWebModuleCommand;
@@ -47,17 +48,17 @@
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.help.WorkbenchHelp;
 
+import org.eclipse.wst.server.core.IModule;
 import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.model.IModule;
 import org.eclipse.wst.server.ui.ServerUICore;
 import org.eclipse.wst.server.ui.editor.ICommandManager;
-import org.eclipse.wst.server.ui.editor.ServerResourceEditorPart;
+import org.eclipse.wst.server.ui.editor.ServerEditorPart;
 /**
  * Tomcat configuration web module editor page.
  */
-public class ConfigurationWebModuleEditorPart extends ServerResourceEditorPart {
+public class ConfigurationWebModuleEditorPart extends ServerEditorPart {
 	protected ITomcatServerWorkingCopy server2;
-	protected ITomcatConfigurationWorkingCopy configuration;
+	protected TomcatConfiguration configuration;
 
 	protected Table webAppTable;
 	protected int selection = -1;
@@ -90,7 +91,7 @@
 				}
 			}
 		};
-		serverConfiguration.addPropertyChangeListener(listener);
+		configuration.addPropertyChangeListener(listener);
 	}
 	
 	protected ICommandManager getCommandManager() {
@@ -188,7 +189,7 @@
 		else {
 			addProject.addSelectionListener(new SelectionAdapter() {
 				public void widgetSelected(SelectionEvent e) {
-					WebModuleDialog dialog = new WebModuleDialog(getEditorSite().getShell(), server2, configuration, true);
+					WebModuleDialog dialog = new WebModuleDialog(getEditorSite().getShell(), getServer(), server2, configuration, true);
 					dialog.open();
 					if (dialog.getReturnCode() == IDialogConstants.OK_ID) {
 						getCommandManager().executeCommand(new AddWebModuleCommand(configuration, dialog.getWebModule()));
@@ -202,7 +203,7 @@
 		addExtProject.setLayoutData(data);
 		addExtProject.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				WebModuleDialog dialog = new WebModuleDialog(getEditorSite().getShell(), server2, configuration, false);
+				WebModuleDialog dialog = new WebModuleDialog(getEditorSite().getShell(), getServer(), server2, configuration, false);
 				dialog.open();
 				if (dialog.getReturnCode() == IDialogConstants.OK_ID) {
 					getCommandManager().executeCommand(new AddWebModuleCommand(configuration, dialog.getWebModule()));
@@ -220,7 +221,7 @@
 				if (selection < 0)
 					return;
 				WebModule module = (WebModule) configuration.getWebModules().get(selection);
-				WebModuleDialog dialog = new WebModuleDialog(getEditorSite().getShell(), server2, configuration, module);
+				WebModuleDialog dialog = new WebModuleDialog(getEditorSite().getShell(), getServer(), server2, configuration, module);
 				dialog.open();
 				if (dialog.getReturnCode() == IDialogConstants.OK_ID) {
 					getCommandManager().executeCommand(new ModifyWebModuleCommand(configuration, selection, dialog.getWebModule()));
@@ -247,50 +248,40 @@
 
 		initialize();
 	}
-	
+
 	protected boolean canAddWebModule() {
-		Iterator iterator = ServerUtil.getModules("j2ee.web", "*", false).iterator();
-		while (iterator.hasNext()) {
-			Object module = iterator.next();
-			if (module instanceof IWebModule) {
-				IStatus status = server.canModifyModules(new IModule[] { (IWebModule) module }, null);
-				if (status != null && status.isOK())
-					return true;
+		IModule[] modules = ServerUtil.getModules(server.getServerType().getRuntimeType().getModuleTypes());
+		if (modules != null) {
+			int size = modules.length;
+			for (int i = 0; i < size; i++) {
+				IWebModule webModule = (IWebModule) modules[i].getAdapter(IWebModule.class);
+				if (webModule != null) {
+					IStatus status = server.canModifyModules(new IModule[] { modules[i] }, null, null);
+					if (status != null && status.isOK())
+						return true;
+				}
 			}
 		}
 		return false;
 	}
-	
+
 	public void dispose() {
-		if (serverConfiguration != null)
-			serverConfiguration.removePropertyChangeListener(listener);
+		if (configuration != null)
+			configuration.removePropertyChangeListener(listener);
 	}
 		
 	/* (non-Javadoc)
 	 * Initializes the editor part with a site and input.
-	 * <p>
-	 * Subclasses of <code>EditorPart</code> must implement this method.  Within
-	 * the implementation subclasses should verify that the input type is acceptable
-	 * and then save the site and input.  Here is sample code:
-	 * </p>
-	 * <pre>
-	 *		if (!(input instanceof IFileEditorInput))
-	 *			throw new PartInitException("Invalid Input: Must be IFileEditorInput");
-	 *		setSite(site);
-	 *		setInput(editorInput);
-	 * </pre>
 	 */
 	public void init(IEditorSite site, IEditorInput input) {
 		super.init(site, input);
 		
-		if (serverConfiguration != null) {
-			configuration = (ITomcatConfigurationWorkingCopy) serverConfiguration.getWorkingCopyDelegate();
-			addChangeListener();
-		}
+		TomcatServer ts = (TomcatServer) server.getAdapter(TomcatServer.class);
+		configuration = ts.getTomcatConfiguration();
 		
-		if (server != null) {
-			server2 = (ITomcatServerWorkingCopy) server.getWorkingCopyDelegate();
-		}
+		if (server != null)
+			server2 = (ITomcatServerWorkingCopy) server.getAdapter(ITomcatServerWorkingCopy.class);
+		
 		initialize();
 	}
 
@@ -316,16 +307,10 @@
 			if (memento != null && memento.length() > 0) {
 				projectName = TomcatUIPlugin.getResource("%configurationEditorProjectMissing", new String[] {memento});
 				projectImage = TomcatUIPlugin.getImage(TomcatUIPlugin.IMG_PROJECT_MISSING);
-				int index = memento.indexOf(":");
-				if (index > 0) {
-					String factoryId = memento.substring(0, index);
-					String mem = memento.substring(index + 1);
-					projectName = TomcatUIPlugin.getResource("%configurationEditorProjectMissing", new String[] {mem});
-					IModule module2 = ServerUtil.getModule(factoryId, mem);
-					if (module != null) {
-						projectName = ServerUICore.getLabelProvider().getText(module2);
-						projectImage = ServerUICore.getLabelProvider().getImage(module2);
-					}
+				IModule module2 = ServerUtil.getModule(memento);
+				if (module != null) {
+					projectName = ServerUICore.getLabelProvider().getText(module2);
+					projectImage = ServerUICore.getLabelProvider().getImage(module2);
 				}
 			}
 	
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java
index 0725b8b..f986b84 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jst.server.tomcat.core.internal.MimeMapping;
@@ -25,7 +26,6 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.help.WorkbenchHelp;
-
 /**
  * Dialog to add or modify mime mappings.
  */
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java
index 693c52a..eb8865c 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSection.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 
@@ -37,7 +38,7 @@
 /**
  * Tomcat server general editor page.
  */
-public class ServerGeneralEditorSection extends ServerResourceEditorSection {
+public class ServerGeneralEditorSection extends ServerEditorSection {
 	protected ITomcatServerWorkingCopy tomcatServer;
 
 	protected Button secure;
@@ -50,7 +51,9 @@
 	/**
 	 * ServerGeneralEditorPart constructor comment.
 	 */
-	protected ServerGeneralEditorSection() { }
+	protected ServerGeneralEditorSection() {
+		// do nothing
+	}
 
 	/**
 	 * 
@@ -164,7 +167,7 @@
 		super.init(site, input);
 		
 		if (server != null) {
-			tomcatServer = (ITomcatServerWorkingCopy) server.getWorkingCopyDelegate();
+			tomcatServer = (ITomcatServerWorkingCopy) server.getAdapter(ITomcatServerWorkingCopy.class);
 			addChangeListener();
 		}
 		initialize();
@@ -194,6 +197,4 @@
 		
 		updating = false;
 	}
-	
-	protected void validate() { }
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSectionFactory.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSectionFactory.java
index fb2c7f4..ab977a0 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSectionFactory.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ServerGeneralEditorSectionFactory.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,24 +8,17 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerConfiguration;
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
+
 import org.eclipse.wst.server.ui.editor.*;
 /**
  *
  */
-public class ServerGeneralEditorSectionFactory implements IServerEditorPageSectionFactoryDelegate {
+public class ServerGeneralEditorSectionFactory extends ServerEditorPageSectionFactoryDelegate {
 	/*
-	 * @see IServerEditorPartFactoryDelegate#shouldDisplay(IServer, IServerConfiguration)
-	 */
-	public boolean shouldCreateSection(IServer server, IServerConfiguration configuration) {
-		return (server != null && server.getServerType().getId().indexOf("tomcat") >= 0);
-	}
-
-	/*
-	 * @see IServerEditorPartFactoryDelegate#createPage()
+	 * @see ServerEditorPartFactoryDelegate#createPage()
 	 */
 	public IServerEditorSection createSection() {
 		return new ServerGeneralEditorSection();
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java
index 2c03fae..25af3d8 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.tomcat.ui.internal.editor;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,7 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import java.util.Iterator;
+package org.eclipse.jst.server.tomcat.ui.internal.editor;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.Dialog;
@@ -39,8 +38,9 @@
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.help.WorkbenchHelp;
 
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServerAttributes;
 import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.model.IModule;
 import org.eclipse.wst.server.ui.ServerUICore;
 /**
  * Dialog to add or modify web modules.
@@ -50,6 +50,7 @@
 	protected boolean isEdit;
 	protected boolean isProject;
 	protected Text docBase;
+	protected IServerAttributes server2;
 	protected ITomcatServer server;
 	protected ITomcatConfiguration config;
 
@@ -59,9 +60,10 @@
 	 * WebModuleDialog constructor comment.
 	 * @param parentShell org.eclipse.swt.widgets.Shell
 	 */
-	protected WebModuleDialog(Shell parentShell, ITomcatServer server, ITomcatConfiguration config, WebModule module) {
+	protected WebModuleDialog(Shell parentShell, IServerAttributes server2, ITomcatServer server, ITomcatConfiguration config, WebModule module) {
 		super(parentShell);
 		this.module = module;
+		this.server2 = server2;
 		this.server = server;
 		this.config = config;
 		isEdit = true;
@@ -71,8 +73,8 @@
 	 * WebModuleDialog constructor comment.
 	 * @param parentShell org.eclipse.swt.widgets.Shell
 	 */
-	protected WebModuleDialog(Shell parentShell, ITomcatServer server, ITomcatConfiguration config, boolean isProject) {
-		this(parentShell, server, config, new WebModule("/", "", null, true));
+	protected WebModuleDialog(Shell parentShell, IServerAttributes server2, ITomcatServer server, ITomcatConfiguration config, boolean isProject) {
+		this(parentShell, server2, server, config, new WebModule("/", "", null, true));
 		isEdit = false;
 		this.isProject = isProject;
 	}
@@ -128,17 +130,20 @@
 			WorkbenchHelp.setHelp(projTable, ContextIds.CONFIGURATION_EDITOR_WEBMODULE_DIALOG_PROJECT);
 	
 			// fill table with web module projects
-			Iterator iterator = ServerUtil.getModules("j2ee.web", "*", false).iterator();
-			while (iterator.hasNext()) {
-				Object module3 = iterator.next();
-				if (module3 instanceof IWebModule) {
-					IWebModule module2 = (IWebModule) module3;
-					IStatus status = server.canModifyModules(new IModule[] { module2}, null);
-					if (status != null && status.isOK()) {
-						TableItem item = new TableItem(projTable, SWT.NONE);
-						item.setText(0, ServerUICore.getLabelProvider().getText(module2));
-						item.setImage(0, ServerUICore.getLabelProvider().getImage(module2));
-						item.setData(module2);
+			IModule[] modules = ServerUtil.getModules(server2.getServerType().getRuntimeType().getModuleTypes());
+			if (modules != null) {
+				int size = modules.length;
+				for (int i = 0; i < size; i++) {
+					IModule module3 = modules[i];
+					IWebModule module2 = (IWebModule) module3.getAdapter(IWebModule.class);
+					if (module2 != null) {
+						IStatus status = server2.canModifyModules(new IModule[] { module3 }, null, null);
+						if (status != null && status.isOK()) {
+							TableItem item = new TableItem(projTable, SWT.NONE);
+							item.setText(0, ServerUICore.getLabelProvider().getText(module2));
+							item.setImage(0, ServerUICore.getLabelProvider().getImage(module2));
+							item.setData(module2);
+						}
 					}
 				}
 			}
@@ -222,9 +227,11 @@
 						String contextRoot = module2.getContextRoot();
 						if (contextRoot != null && !contextRoot.startsWith("/"))
 							contextRoot = "/" + contextRoot;
-						module = new WebModule(contextRoot, module2.getLocation().toOSString(), module2.getFactoryId() + ":" + module2.getId(), module.isReloadable());
+						module = new WebModule(contextRoot, module2.getLocation().toOSString(), module.getMemento(), module.isReloadable());
 						docBase.setText(module2.getLocation().toOSString());
-					} catch (Exception e) { }
+					} catch (Exception e) {
+						// ignore
+					}
 					validate();
 				}
 			});
diff --git a/plugins/org.eclipse.jst.server.ui/plugin.properties b/plugins/org.eclipse.jst.server.ui/plugin.properties
index 044ec1c..0421c41 100644
--- a/plugins/org.eclipse.jst.server.ui/plugin.properties
+++ b/plugins/org.eclipse.jst.server.ui/plugin.properties
@@ -13,62 +13,23 @@
 
 # --------------- Java UI ---------------
 
-javaSystemPropertiesTitle=System Properties
-javaSystemPropertiesDescription=Enter system properties (-D options) to be passed to the server.
-
-javaClasspathTitle=Class Path
-javaClasspathDescription=Change class path entries.
-
-javaPathTitle=Java Library Path
-javaPathDescription=Enter Java Library Path and choose one of the Path Options.
-javaPathValue=Java Library Path
-
-javaVMArgumentsTitle=Java VM Arguments
-javaVMArgumentsDescription=Enter arguments to the Java VM.
-
-javaAdd=Add...
-javaRemove=Remove
-javaEdit=Edit...
-javaDown=Down
-javaUp=Up
 javaBrowse=&Browse...
 
-javaSystemProperties=System Properties:
-javaSystemPropertyNameColumn=Name
-javaSystemPropertyValueColumn=Value
 javaSystemPropertyAddDialog=Add System Property
 javaSystemPropertyEditDialog=Edit System Property
 javaSystemPropertyName=&Name:
 javaSystemPropertyValue=&Value:
 
-javaClasspath=Class Path:
-javaAddExternalJar=Add External JARs...
 javaAddExternalJarDialog=Select JAR file
-javaAddExternalFolder=Add External Folder...
-javaAddExternalFolderDialog=Select Folder
-javaAddExternalFolderDialogMessage=Select a folder to add to the class path.
-javaAddFolder=Add Folder...
-javaAddFolderDialogTitle=Select Folder
-javaAddFolderDialogMessage=Select a folder to add to the class path.
-javaAddVariable=Add Variable...
 javaAddVariableDialogTitle=Add Class Path Variable
 javaAddVariableDialogName=&Variable Name:
 javaAddVariableDialogExtension=&Path Extension:
 javaAddVariableDialogResolved=Resolved Path:
-javaAddString=Add Path...
 javaAddStringDialogTitle=Add Class Path
 javaAddStringDialogPath=Path:
 javaAddStringDialogInvalidPath=The path must be absolute.
 javaEditStringDialogTitle=Edit Class Path
 
-javaPath=System Path:
-javaPathGroup=Path Option
-javaPathAppend=Append to system path
-javaPathPrepend=Prepend to system path
-javaPathReplace=Replace system path
-
-javaVMArguments=Java VM Arguments:
-
 runtimeTypeTitle=Generic J2EE Runtime
 runtimeTypeDescription=Define a generic J2EE runtime. Specify a directory containing jar files to compile against.
 runtimeTypeName=Na&me:
diff --git a/plugins/org.eclipse.jst.server.ui/plugin.xml b/plugins/org.eclipse.jst.server.ui/plugin.xml
index 6ee0308..8a9540b 100644
--- a/plugins/org.eclipse.jst.server.ui/plugin.xml
+++ b/plugins/org.eclipse.jst.server.ui/plugin.xml
@@ -3,17 +3,13 @@
 
 <plugin id="org.eclipse.jst.server.ui"
   name="%pluginName"
-  version="3.0.0"
+  version="1.0.0"
   provider-name="%providerName"
   class="org.eclipse.jst.server.internal.ui.JavaServerUIPlugin">
 
 <requires>
   <import plugin="org.eclipse.core.runtime"/>
-  <import plugin="org.eclipse.core.resources"/>
   <import plugin="org.eclipse.ui"/>
-  <import plugin="org.eclipse.ui.ide"/>
-  <import plugin="org.eclipse.ui.views"/>
-  <import plugin="org.eclipse.ui.editors"/>
   <import plugin="org.eclipse.jdt.core"/>
   <import plugin="org.eclipse.jdt.launching"/>
   <import plugin="org.eclipse.wst.server.core"/>
@@ -24,7 +20,6 @@
   <runtime>
     <library name="sjavaui.jar">
       <export name="*"/>
-      <packages prefixes="org.eclipse.jst.server.ui"/>
     </library>
   </runtime>
 
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ContextIds.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ContextIds.java
index 912c27f..8d553ac 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ContextIds.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ContextIds.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.internal.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.internal.ui;
 /**
  * Context help id constants.
  */
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeComposite.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeComposite.java
index 9b664c6..2402d33 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeComposite.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeComposite.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.internal.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.internal.ui;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -70,7 +71,7 @@
 			runtime = null;
 		} else {
 			runtimeWC = newRuntime;
-			runtime = (IGenericRuntimeWorkingCopy) newRuntime.getWorkingCopyDelegate();
+			runtime = (IGenericRuntimeWorkingCopy) newRuntime.getAdapter(IGenericRuntimeWorkingCopy.class);
 		}
 		
 		init();
@@ -152,7 +153,7 @@
 			public void widgetSelected(SelectionEvent e) {
 				int sel = combo.getSelectionIndex();
 				IVMInstall vmInstall = (IVMInstall) installedJREs.get(sel);
-				runtime.setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
+				runtime.setVMInstall(vmInstall);
 				validate();
 			}
 
@@ -241,8 +242,7 @@
 		int size = installedJREs.size();
 		for (int i = 0; i < size; i++) {
 			IVMInstall vmInstall = (IVMInstall) installedJREs.get(i);
-			if (vmInstall.getVMInstallType().getId().equals(runtime.getVMInstallTypeId())
-					&& vmInstall.getId().equals(runtime.getVMInstallId())) {
+			if (vmInstall.equals(runtime.getVMInstall())) {
 				combo.select(i);
 				found = true;
 			}
@@ -257,7 +257,7 @@
 			return;
 		}
 
-		IStatus status = runtime.validate();
+		IStatus status = runtimeWC.validate(null);
 		if (status == null || status.isOK())
 			wizard.setMessage(null, IMessageProvider.NONE);
 		else
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeWizardFragment.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeWizardFragment.java
index 0a522ca..17ad1e3 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeWizardFragment.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/GenericRuntimeWizardFragment.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.internal.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.internal.ui;
+
 import org.eclipse.wst.server.core.*;
 import org.eclipse.wst.server.ui.wizard.IWizardHandle;
 import org.eclipse.wst.server.ui.wizard.WizardFragment;
@@ -21,7 +22,9 @@
 public class GenericRuntimeWizardFragment extends WizardFragment {
 	protected GenericRuntimeComposite comp;
 	
-	public GenericRuntimeWizardFragment() { }
+	public GenericRuntimeWizardFragment() {
+		// do nothing
+	}
 
 	public boolean hasComposite() {
 		return true;
@@ -37,7 +40,7 @@
 		
 		if (runtime == null)
 			return false;
-		IStatus status = runtime.validate();
+		IStatus status = runtime.validate(null);
 		return (status != null && status.isOK());
 	}
 
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java
index 5540d8e..27d23c0 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.internal.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.internal.ui;
+
 import java.net.URL;
 import java.util.Map;
 import java.util.HashMap;
@@ -55,7 +56,9 @@
 	/**
 	 * Cannot construct an ImageResource. Use static methods only.
 	 */
-	private ImageResource() {}
+	private ImageResource() {
+		// do nothing
+	}
 
 	/**
 	 * Dispose of element images that were created.
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/JavaServerUIPlugin.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/JavaServerUIPlugin.java
index 77a8179..4396276 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/JavaServerUIPlugin.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/JavaServerUIPlugin.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.internal.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.internal.ui;
+
 import java.text.MessageFormat;
 import org.eclipse.core.runtime.*;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java
index 3bac0f8..1b12e86 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.internal.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.internal.ui;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.resource.JFaceResources;
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/Trace.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/Trace.java
index f0f9885..943b459 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/Trace.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/Trace.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.internal.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.internal.ui;
 /**
  * Helper class to route trace output.
  */
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/AddClasspathVariableDialog.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/AddClasspathVariableDialog.java
index e711b8f..af87634 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/AddClasspathVariableDialog.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/AddClasspathVariableDialog.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
+
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.IClasspathEntry;
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IClasspathEditor.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IClasspathEditor.java
index 2829c13..ba28409 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IClasspathEditor.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IClasspathEditor.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
+
 import org.eclipse.jdt.core.IClasspathEntry;
 /**
  * An generic interface for modifying the classpath of a Java server.
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IPathEditor.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IPathEditor.java
index 64be48d..685bc79 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IPathEditor.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IPathEditor.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
 /**
  * An generic interface for modifying the path of a Java server. Can be used
  * to implement the command pattern between the editor and the server.
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/ISystemPropertyEditor.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/ISystemPropertyEditor.java
index 1e10909..8035af4 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/ISystemPropertyEditor.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/ISystemPropertyEditor.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,7 +8,9 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
-import org.eclipse.jst.server.core.SystemProperty;
+package org.eclipse.jst.server.ui;
+
+import org.eclipse.jst.server.core.internal.SystemProperty;
 /**
  * An generic interface for modifying the system properties of
  * a Java server. Can be used to implement the command
@@ -37,4 +38,4 @@
 	 * @param property org.eclipse.jst.server.ui.SystemProperty
 	 */
 	public void removeSystemProperty(SystemProperty property);
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IVMArgumentEditor.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IVMArgumentEditor.java
index 6542dfa..b86a7da 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IVMArgumentEditor.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/IVMArgumentEditor.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,7 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
 /**
  * An generic interface for modifying the VM arguments of a Java
  * server. Can be used to implement the command
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaContextIds.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaContextIds.java
index 1ca57fc..866c88a 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaContextIds.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaContextIds.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,9 +8,12 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
+
 import org.eclipse.jst.server.internal.ui.ContextIds;
 /**
  * Java Context Ids
  */
 public interface JavaContextIds extends ContextIds {
+	// helper interface
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaImages.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaImages.java
index 944eacb..e135094 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaImages.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaImages.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,10 +8,11 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
+
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jst.server.internal.ui.ImageResource;
 import org.eclipse.swt.graphics.Image;
-
 /**
  * 
  */
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaResources.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaResources.java
index 38eb5ee..0e5a601 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaResources.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/JavaResources.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
+
 import org.eclipse.jst.server.internal.ui.JavaServerUIPlugin;
 /**
  * 
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/StringClasspathDialog.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/StringClasspathDialog.java
index ef8e08f..85723b5 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/StringClasspathDialog.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/StringClasspathDialog.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,6 +8,8 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
+
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.dialogs.Dialog;
@@ -27,7 +28,6 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.help.WorkbenchHelp;
-
 /**
  * Dialog to add a string classpath.
  */
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/SystemPropertyDialog.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/SystemPropertyDialog.java
index 51d33ac..8174905 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/SystemPropertyDialog.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/ui/SystemPropertyDialog.java
@@ -1,7 +1,6 @@
-package org.eclipse.jst.server.ui;
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -9,9 +8,11 @@
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
+package org.eclipse.jst.server.ui;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jst.server.core.SystemProperty;
+import org.eclipse.jst.server.core.internal.SystemProperty;
 import org.eclipse.jst.server.internal.ui.ContextIds;
 import org.eclipse.jst.server.internal.ui.JavaServerUIPlugin;
 import org.eclipse.swt.SWT;
@@ -26,7 +27,6 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.help.WorkbenchHelp;
-
 /**
  * Dialog to add or modify system properties.
  */
@@ -177,4 +177,4 @@
 
 		setOkButtonEnabled(result);
 	}
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/plugin.properties b/plugins/org.eclipse.wst.server.core/plugin.properties
index 220b2be..e1690ab 100644
--- a/plugins/org.eclipse.wst.server.core/plugin.properties
+++ b/plugins/org.eclipse.wst.server.core/plugin.properties
@@ -12,114 +12,54 @@
 providerName=IBM
 
 extensionPointServerStartup=Server Startup
-extensionPointModuleKinds=Module Types
+extensionPointModuleTypes=Module Types
 extensionPointRuntimeTypes=Runtime Types
-extensionPointRuntimeTargetHandler=Runtime Target Handler
-extensionPointRuntimeLocator=Runtime Locator
+extensionPointRuntimeTargetHandlers=Runtime Target Handlers
+extensionPointRuntimeLocators=Runtime Locators
 extensionPointServerTypes=Server Types
+extensionPointServerLocators=Server Locators
 extensionPointServerConfigurationTypes=Server Configuration Types
-extensionPointServerLocator=Server Locator
-extensionPointPublishManager=Publish Manager
 extensionPointModuleFactories=Module Factories
-extensionPointModuleObjectAdapters=Module Object Adapters
+extensionPointModuleObjectAdapters=Module Artifact Adapters
 extensionPointLaunchableAdapters=Launchable Adapters
 extensionPointClients=Clients
 extensionPointServerTasks=Server Tasks
-extensionPointModuleTasks=Module Tasks
 extensionPointServerMonitors=Server Monitors
 
 # --------------- Tasks (progress monitors) ---------------
 
-# Creating default server and server configuration
-createServerProjectTask=Creating server project.
-createDefaultServerTask=Creating server.
-createDefaultServerConfigurationTask=Creating server configuration.
-
-# Modifying and searching for servers
-setServerConfigurationTask=Setting the configuration of {0} to {1}...
-removingServerConfigurationTask=Removing the configuration from {0}...
-getDefaultServerTask=Searching for a default server...
-getProjectServerInstanceTask=Locating a server...
-
-configurationUpdateOk=Server configuration updated successfully.
-serverUpdateOk=Server updated sucessfully.
-
 # General tasks
 copyingTask=Copying from {0} to {1}
 unZippingTask=Unzipping {0}
 expandingTask=Expanding {0}
 savingTask=Saving {0}
 deletingTask=Deleting {0}
-loadingTask=Loading {0}
 copyingTask=File copied successfully to {0}
 
-taskCancelled=Operation cancelled.
 taskPerforming=Performing Tasks
-taskPublishing=Publishing: {0}
-taskStarting=Starting {0}
 taskModifyModules=Adding and/or removing projects.
 
 publishingTask=Publishing to {0}...
 publishingStatus=Publishing status
-publishingStart=Connecting to server
 publishingStop=Disconnecting from server
 
-publishingPublishFolder=Creating folder {0}
-publishingPublishFile=Publishing {0}
-publishingDeleteFolder=Removing folder {0}
-publishingDeleteFile=Deleting {0}
 publishingProject=Publishing: {0}
-publishingConfiguration=Publishing configuration: {0}
 
 publishingCancelled=Publishing cancelled
 
 # --------------- Misc UI ---------------
 
-# Server launch configuration
-serverLaunchConfigurationType=Server
-
-# Server builder
-builderName=Server Builder
-
-# Server project nature
-serverProjectNatureTitle=Server Project
-
 # Error Messages
-errorUnconfiguredServer=Unable to run the server because it does not have a valid configuration.
-errorCloseEditor=The action could not be completed because there is an open editor. Close the {0} editor and try again.
-errorNull=Could not perform the action on a null object.
-errorLaunch=Cannot start the server.
-errorInvalidServer=The server is not valid.
-errorServerAlreadyRunning=Cannot start the server because it is already running.
-errorServerStartFailed=The server named {0} did not start correctly. Check the Console for error messages.
 errorPublishing=Could not publish to the server.
 errorNoConfiguration=The server has no configuration.
-errorPublishFailed=Errors occurred during publishing.
-errorRunOnServer=Running resource on server.
-errorRunOnServerFailed=Unable to run on server.
 errorLoading=Error loading from {0}.
 errorSaving=Could not save to {0}.
-errorMissingConfiguration=Server configuration is missing - See Task view
-errorMissingConfigurationTask=Server {0} is missing it's configuration.
-errorMissingProject=Project {0} is missing - See Task view
-errorMissingProjectTask=Server configuration {0} refers to a missing project {1}.
 errorCopyingFile=Error copying file to {0}: {1}
-errorModifyingConfiguration=Error modifying server configuration: {0}.
-errorModifyingServer=Error modifying server: {0}.
-errorCouldNotCreateServerProject=Could not create server project.
-errorCouldNotCreateServerProjectStatus=Could not create server project: {0}.
-errorNoDefaultServer=A default server could not be automatically created.
-errorNoDefaultServerParent=Could not find anything to deploy to the default server.
-errorDefaultServerInvalid=Could not deploy to the default server.
 errorModuleRestartFailed=Could not restart the module.
-
-errorConfigurationUpdate=Could not update the server configuration: {0}
-errorServerUpdate=Could not update the server: {0}
-
-# Info messages
-serverProjectCreated=Server project created successfully.
-infoNoPublishingNecessary=Publishing was not necessary.
-infoPublishSuccess=Published finished successfully.
+errorWorkingCopyTimestamp=Could not save because the file has been modified since the start of editting.
+errorRuntimeName=Enter a name for the runtime.
+errorDuplicateRuntimeName=Name is already in use.
+errorStartFailed=Could not start the server.
 
 # Default server creation names
 # {0} will be replaced by a number if the given name is already being used
@@ -134,18 +74,10 @@
 defaultServerConfigurationName2={0} ({1})
 
 # Used when a name can't be found
-elementUnknownName=<unknown>
 defaultVendor=Basic
 defaultVersion=Basic
-defaultCategory=Basic
 moduleTypeUnknown=Unknown module
 
-# Publishers
-publisherFullName=Publish all
-publisherFullDescription=Publishes all resources to the server, regardless of whether they have changed. No resources are deleted from the server.
-publisherSmartName=Smart publish
-publisherSmartDescription=Intelligently publishes only modified resources to the server. Deletes all resources that no longer exist in the workspace.
-
 # null launchable
 nullLaunchableClient=Do nothing
 nullLaunchableClientDescription=Do not launch anything after starting the server.
diff --git a/plugins/org.eclipse.wst.server.core/plugin.xml b/plugins/org.eclipse.wst.server.core/plugin.xml
index 2a8b426..15fb959 100644
--- a/plugins/org.eclipse.wst.server.core/plugin.xml
+++ b/plugins/org.eclipse.wst.server.core/plugin.xml
@@ -3,7 +3,7 @@
 
 <plugin id="org.eclipse.wst.server.core"
   name="%pluginName"
-  version="3.0.0"
+  version="1.0.0"
   provider-name="%providerName"
   class="org.eclipse.wst.server.core.internal.ServerPlugin">
 
@@ -16,80 +16,26 @@
   <runtime>
     <library name="servercore.jar">
       <export name="*"/>
-      <packages prefixes="org.eclipse.wst.server.core"/>
     </library>
   </runtime>
 
   <extension-point id="startup" name="%extensionPointServerStartup" schema="schema/startup.exsd"/>
-  <extension-point id="moduleKinds" name="%extensionPointModuleKinds" schema="schema/moduleKinds.exsd"/>
+  <extension-point id="moduleTypes" name="%extensionPointModuleTypes" schema="schema/moduleTypes.exsd"/>
   <extension-point id="runtimeTypes" name="%extensionPointRuntimeTypes" schema="schema/runtimeTypes.exsd"/>
   <extension-point id="runtimeTargetHandlers" name="%extensionPointRuntimeTargetHandlers" schema="schema/runtimeTargetHandlers.exsd"/>
   <extension-point id="runtimeLocators" name="%extensionPointRuntimeLocators" schema="schema/runtimeLocators.exsd"/>
   <extension-point id="serverTypes" name="%extensionPointServerTypes" schema="schema/serverTypes.exsd"/>
   <extension-point id="serverLocators" name="%extensionPointServerLocators" schema="schema/serverLocators.exsd"/>
-  <extension-point id="serverConfigurationTypes" name="%extensionPointServerConfigurationTypes" schema="schema/serverConfigurationTypes.exsd"/>
-  <extension-point id="publish" name="%extensionPointPublishManager" schema="schema/publishManager.exsd"/>
   <extension-point id="moduleFactories" name="%extensionPointModuleFactories" schema="schema/moduleFactories.exsd"/>
-  <extension-point id="moduleObjectAdapters" name="%extensionPointModuleObjectAdapters" schema="schema/moduleObjectAdapters.exsd"/>
+  <extension-point id="moduleArtifactAdapters" name="%extensionPointModuleArtifactAdapters" schema="schema/moduleArtifactAdapters.exsd"/>
   <extension-point id="launchableAdapters" name="%extensionPointLaunchableAdapters" schema="schema/launchableAdapters.exsd"/>
   <extension-point id="clients" name="%extensionPointClients" schema="schema/clients.exsd"/>
   <extension-point id="serverTasks" name="%extensionPointServerTasks" schema="schema/serverTasks.exsd"/>
-  <extension-point id="moduleTasks" name="%extensionPointModuleTasks" schema="schema/moduleTasks.exsd"/>
   <extension-point id="serverMonitors" name="%extensionPointServerMonitors" schema="schema/serverMonitors.exsd"/>
-
-  <extension point="org.eclipse.core.resources.natures"
-     id="nature"
-     name="%serverProjectNatureTitle">
-     <runtime>
-        <run class="org.eclipse.wst.server.core.internal.ServerProjectNature">
-        </run>
-     </runtime>
-  </extension>
-
-  <extension point="org.eclipse.core.resources.builders"
-     id="builder"
-     name="%builderName">
-     <builder>
-        <run class="org.eclipse.wst.server.core.internal.ServerBuilder">
-        </run>
-     </builder>
-  </extension>
-
-  <extension point="org.eclipse.wst.server.core.publish">
-     <publish
-           name="%publisherFullName"
-           description="%publisherFullDescription"
-           class="org.eclipse.wst.server.core.internal.FullPublisher"
-           id="org.eclipse.wst.server.core.publish.full">
-     </publish>
-     <publish
-           name="%publisherSmartName"
-           description="%publisherSmartDescription"
-           class="org.eclipse.wst.server.core.internal.SmartPublisher"
-           id="org.eclipse.wst.server.core.publish.smart">
-     </publish>
-  </extension>
   
-  <extension point="org.eclipse.wst.server.core.moduleKinds">
-    <moduleKind
+  <extension point="org.eclipse.wst.server.core.moduleTypes">
+    <moduleType
        id="*"
        name="%moduleTypeUnknown"/>
   </extension>
-
-  <extension point="org.eclipse.wst.server.core.moduleFactories">
-     <moduleFactory
-           projects="false"
-           class="org.eclipse.wst.server.core.util.MissingModuleFactoryDelegate"
-           id="org.eclipse.wst.server.core.missingModuleFactory">
-     </moduleFactory>
-  </extension>
-
-   <extension point="org.eclipse.wst.server.core.clients">
-     <client
-           id="org.eclipse.wst.server.core.client.null"
-           name="%nullLaunchableClient"
-           description="%nullLaunchableClientDescription"
-           class="org.eclipse.wst.server.core.util.NullLaunchableClient">
-     </client>
-  </extension>
 </plugin>
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/schema/clients.exsd b/plugins/org.eclipse.wst.server.core/schema/clients.exsd
index 71277b1..fd60465 100644
--- a/plugins/org.eclipse.wst.server.core/schema/clients.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/clients.exsd
@@ -58,11 +58,11 @@
          <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IClientDelegate&lt;/samp&gt;.
+                  specifies the fully qualified name of the Java class that extend &lt;samp&gt;ClientDelegate&lt;/samp&gt;.
 Clieint instances of this type will delegate to instances of this class to launch.

                </documentation>

                <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>

                </appInfo>

             </annotation>

          </attribute>

@@ -109,7 +109,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IClientDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.ClientDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/launchableAdapters.exsd b/plugins/org.eclipse.wst.server.core/schema/launchableAdapters.exsd
index 3e3eae3..620bfb0 100644
--- a/plugins/org.eclipse.wst.server.core/schema/launchableAdapters.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/launchableAdapters.exsd
@@ -58,11 +58,11 @@
          <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;ILaunchableAdapterDelegate&lt;/samp&gt;.
+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;LaunchableAdapterDelegate&lt;/samp&gt;.
 Launchable adapter instances of this type will delegate to instances of this class.

                </documentation>

                <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>

                </appInfo>

             </annotation>

          </attribute>

@@ -93,7 +93,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.ILaunchableAdapterDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.LaunchableAdapterDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleObjectAdapters.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
similarity index 85%
rename from plugins/org.eclipse.wst.server.core/schema/moduleObjectAdapters.exsd
rename to plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
index c866b64..c2cd833 100644
--- a/plugins/org.eclipse.wst.server.core/schema/moduleObjectAdapters.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
@@ -3,17 +3,17 @@
 <schema targetNamespace="org.eclipse.wst.server.core">

 <annotation>

       <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.core" id="moduleObjectAdapters" name="Module Object Adapters"/>

+         <meta.schema plugin="org.eclipse.wst.server.core" id="moduleArtifactAdapters" name="Module Artifact Adapters"/>

       </appInfo>

       <documentation>

-         This extension point provides a way to invoke code during the server core plugin startup. Use sparingly.

+         

       </documentation>

    </annotation>

 

    <element name="extension">

       <complexType>

          <sequence>

-            <element ref="moduleObjectAdapter" minOccurs="0" maxOccurs="unbounded"/>

+            <element ref="moduleArtifactAdapter" minOccurs="0" maxOccurs="unbounded"/>

          </sequence>

          <attribute name="point" type="string" use="required">

             <annotation>

@@ -39,7 +39,7 @@
       </complexType>

    </element>

 

-   <element name="moduleObjectAdapter">

+   <element name="moduleArtifactAdapter">

       <annotation>

          <appInfo>

             <meta.element labelAttribute="name"/>

@@ -58,11 +58,11 @@
          <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IModuleObjectAdapterDelegate&lt;/samp&gt;.
+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;ModuleArtifactAdapterDelegate&lt;/samp&gt;.
 Module object adapter instances of this type will delegate to instances of this class.

                </documentation>

                <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>

                </appInfo>

             </annotation>

          </attribute>

@@ -96,7 +96,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IModuleObjectAdapterDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleFactories.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleFactories.exsd
index d345cff..7b12d06 100644
--- a/plugins/org.eclipse.wst.server.core/schema/moduleFactories.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/moduleFactories.exsd
@@ -59,11 +59,11 @@
          <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IModuleFactoryDelegate&lt;/samp&gt;.
+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;ModuleFactoryDelegate&lt;/samp&gt;.
 Module factory instances of this type will delegate to instances of this class.

                </documentation>

                <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>

                </appInfo>

             </annotation>

          </attribute>

@@ -74,7 +74,7 @@
                </documentation>

             </annotation>

          </attribute>

-         <attribute name="index" type="string">

+         <attribute name="order" type="string">

             <annotation>

                <documentation>

                   

@@ -123,7 +123,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IModuleFactoryDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.ModuleFactoryDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleTasks.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleTasks.exsd
deleted file mode 100644
index c7686cd..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/moduleTasks.exsd
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>

-<!-- Schema file written by PDE -->

-<schema targetNamespace="org.eclipse.wst.server.core">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.core" id="moduleTasks" name="Module Tasks"/>

-      </appInfo>

-      <documentation>

-         This extension point is used to provide a task that can/should be run on modules before server publishing, startup, etc.

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence>

-            <element ref="moduleTask" minOccurs="0" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  a fully qualified identifier of the target extension point

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  an optional identifier of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  an optional name of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="moduleTask">

-      <annotation>

-         <appInfo>

-            <meta.element labelAttribute="name"/>

-         </appInfo>

-      </annotation>

-      <complexType>

-         <sequence>

-         </sequence>

-         <attribute name="id" type="string" use="required">

-            <annotation>

-               <documentation>

-                  specifies a unique identifier for this extension point

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IModuleTaskDelegate&lt;/samp&gt;.
-Module task instances of this type will delegate to instances of this class.

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-         <attribute name="typeIds" type="string">

-            <annotation>

-               <documentation>

-                  a comma separated list of server type ids that this task may apply to. Used for memory &amp; performance reasons

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         The following is an example of a module task extension point:
-
-&lt;p&gt;
-&lt;pre&gt;
-
-&lt;/pre&gt;
-&lt;/p&gt;

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IModuleTaskDelegate&lt;/b&gt;.

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="copyright"/>

-      </appInfo>

-      <documentation>

-         Copyright (c) 2000, 2003 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made 
-available under the terms of the Common Public License v1.0 which accompanies 
-this distribution, and is available at 
-&lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt;http://www.eclipse.org/legal/cpl-v10.html&lt;/a&gt;

-      </documentation>

-   </annotation>

-

-</schema>

diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleKinds.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleTypes.exsd
similarity index 95%
rename from plugins/org.eclipse.wst.server.core/schema/moduleKinds.exsd
rename to plugins/org.eclipse.wst.server.core/schema/moduleTypes.exsd
index c21f43c..e59234c 100644
--- a/plugins/org.eclipse.wst.server.core/schema/moduleKinds.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/moduleTypes.exsd
@@ -3,7 +3,7 @@
 <schema targetNamespace="org.eclipse.wst.server.core">

 <annotation>

       <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.core" id="moduleKinds" name="Module Kinds"/>

+         <meta.schema plugin="org.eclipse.wst.server.core" id="moduleTypes" name="Module Types"/>

       </appInfo>

       <documentation>

          This extension point is used to provide a new module type.

@@ -13,7 +13,7 @@
    <element name="extension">

       <complexType>

          <sequence>

-            <element ref="moduleKind" minOccurs="0" maxOccurs="unbounded"/>

+            <element ref="moduleType" minOccurs="0" maxOccurs="unbounded"/>

          </sequence>

          <attribute name="point" type="string" use="required">

             <annotation>

@@ -39,7 +39,7 @@
       </complexType>

    </element>

 

-   <element name="moduleKind">

+   <element name="moduleType">

       <annotation>

          <appInfo>

             <meta.element labelAttribute="name"/>

diff --git a/plugins/org.eclipse.wst.server.core/schema/publishManager.exsd b/plugins/org.eclipse.wst.server.core/schema/publishManager.exsd
deleted file mode 100644
index aca4811..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/publishManager.exsd
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>

-<!-- Schema file written by PDE -->

-<schema targetNamespace="org.eclipse.wst.server.core">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.core" id="publish" name="Publish"/>

-      </appInfo>

-      <documentation>

-         This extension point is used to provide new publish managers.

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence>

-            <element ref="publish" minOccurs="0" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  a fully qualified identifier of the target extension point

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  an optional identifier of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  an optional name of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="publish">

-      <annotation>

-         <appInfo>

-            <meta.element labelAttribute="name"/>

-         </appInfo>

-      </annotation>

-      <complexType>

-         <sequence>

-         </sequence>

-         <attribute name="id" type="string" use="required">

-            <annotation>

-               <documentation>

-                  specifies a unique identifier for this extension point

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IPublisher&lt;/samp&gt;

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IPublishManagerDelegate"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  a translatable name used to identify the publisher

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="description" type="string">

-            <annotation>

-               <documentation>

-                  a translatable description of the publisher

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         The following is an example of a publish extension point:
-
-&lt;p&gt;
-&lt;pre&gt;
-
-&lt;/pre&gt;
-&lt;/p&gt;

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IPublishManagerDelegate&lt;/b&gt;.

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="copyright"/>

-      </appInfo>

-      <documentation>

-         Copyright (c) 2000, 2003 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made 
-available under the terms of the Common Public License v1.0 which accompanies 
-this distribution, and is available at 
-&lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt;http://www.eclipse.org/legal/cpl-v10.html&lt;/a&gt;

-      </documentation>

-   </annotation>

-

-</schema>

diff --git a/plugins/org.eclipse.wst.server.core/schema/runtimeLocator.exsd b/plugins/org.eclipse.wst.server.core/schema/runtimeLocators.exsd
similarity index 88%
rename from plugins/org.eclipse.wst.server.core/schema/runtimeLocator.exsd
rename to plugins/org.eclipse.wst.server.core/schema/runtimeLocators.exsd
index aab223a..c8194a2 100644
--- a/plugins/org.eclipse.wst.server.core/schema/runtimeLocator.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/runtimeLocators.exsd
@@ -3,7 +3,7 @@
 <schema targetNamespace="org.eclipse.wst.server.core">

 <annotation>

       <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.core" id="runtimeLocator" name="Runtime Locator"/>

+         <meta.schema plugin="org.eclipse.wst.server.core" id="runtimeLocators" name="Runtime Locators"/>

       </appInfo>

       <documentation>

          This extension point is used to locate new runtimes on the local machine.

@@ -70,11 +70,18 @@
          <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IRuntimeLocatorDelegate&lt;/samp&gt;.
+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;RuntimeLocatorDelegate&lt;/samp&gt;.
 Runtime locator instances of this type will delegate to instances of this class.

                </documentation>

             </annotation>

          </attribute>

+         <attribute name="typeIds" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

       </complexType>

    </element>

 

@@ -104,7 +111,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IRuntimeLocatorDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.RuntimeLocatorDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/runtimeTargetHandlers.exsd b/plugins/org.eclipse.wst.server.core/schema/runtimeTargetHandlers.exsd
index b70a429..edc641b 100644
--- a/plugins/org.eclipse.wst.server.core/schema/runtimeTargetHandlers.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/runtimeTargetHandlers.exsd
@@ -65,7 +65,7 @@
          <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IRuntimeTargetHandlerDelegate&lt;/samp&gt;.
+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;RuntimeTargetHandlerDelegate&lt;/samp&gt;.
 Runtime target handler instances of this type will delegate to instances of this class.

                </documentation>

                <appInfo>

@@ -108,7 +108,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IRuntimeTargetHandlerDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.RuntimeTargetHandlerDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/runtimeTypes.exsd b/plugins/org.eclipse.wst.server.core/schema/runtimeTypes.exsd
index 3b13299..9d4ad87 100644
--- a/plugins/org.eclipse.wst.server.core/schema/runtimeTypes.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/runtimeTypes.exsd
@@ -94,16 +94,8 @@
          <attribute name="class" type="string">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IRuntimeDelegate&lt;/samp&gt;.
-Runtime instances of this type will delegate to instances of this class.

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="workingCopyClass" type="string">

-            <annotation>

-               <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IRuntimeWorkingCopyDelegate&lt;/samp&gt;.
-Runtime instances of this type will delegate to instances of this class.

+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;RuntimeDelegate&lt;/samp&gt;.
+Runtime instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor.

                </documentation>

             </annotation>

          </attribute>

@@ -152,8 +144,7 @@
        description=&quot;%runtimeTypeDescription&quot;
        vendor=&quot;%runtimeTypeVendor&quot;
        version=&quot;1.0&quot;
-       class=&quot;com.example.ExampleRuntimeDelegate&quot;
-       workingCopyClass=&quot;com.example.ExampleRuntimeWorkingCopyDelegate&quot;&gt;
+       class=&quot;com.example.ExampleRuntimeDelegate&quot;&gt;
        &lt;moduleType
          types=&quot;j2ee.web&quot;
          versions=&quot;1.2, 1.3, 1.4&quot;/&gt;
@@ -169,7 +160,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IRuntimeDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.RuntimeDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/serverConfigurationTypes.exsd b/plugins/org.eclipse.wst.server.core/schema/serverConfigurationTypes.exsd
deleted file mode 100644
index 5d014fc..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/serverConfigurationTypes.exsd
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>

-<!-- Schema file written by PDE -->

-<schema targetNamespace="org.eclipse.wst.server.core">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.core" id="serverConfigurationTypes" name="Server Configuration Types"/>

-      </appInfo>

-      <documentation>

-         This extension point is used to provide a new server configuration type.

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence>

-            <element ref="serverConfigurationType"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  a fully qualified identifier of the target extension point

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  an optional identifier of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  an optional name of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="serverConfigurationType">

-      <complexType>

-         <attribute name="id" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string" use="required">

-            <annotation>

-               <documentation>

-                  a translatable name used to identify this server configuration

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="description" type="string" use="required">

-            <annotation>

-               <documentation>

-                  a translatable description of this server configuration type

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="class" type="string">

-            <annotation>

-               <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IServerConfigurationDelegate&lt;/samp&gt;.
-Server configuration instances of this type will delegate to instances of this class.

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="isFolder" type="string">

-            <annotation>

-               <documentation>

-                  true if the configuration requires it&apos;s own data in a folder

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="workingCopyClass" type="string">

-            <annotation>

-               <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IServerConfigurationWorkingCopyDelegate&lt;/samp&gt;.
-Server configuration instances of this type will delegate to instances of this class.

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="order" type="string">

-            <annotation>

-               <documentation>

-                  an integer order specifying the relative importance of this server configuration type

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="importExtensions" type="string">

-            <annotation>

-               <documentation>

-                  a comma separated list of import extensions (e.g. &quot;xml&quot;, &quot;cfg&quot;) that this server configuration could be imported using

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         The following is an example of a server configuration type extension point:
-
-&lt;p&gt;
-&lt;pre&gt;
-  &lt;extension point=&quot;org.eclipse.wst.server.core.serverConfigurationTypes&quot;&gt;
-     &lt;serverConfigurationType
-       id=&quot;com.example.serverConfiguration&quot;
-       name=&quot;%serverConfigurationTypeName&quot;
-       description=&quot;%serverConfigurationTypeDescription&quot;
-       isFolder=&quot;true&quot;
-       class=&quot;com.example.ExampleServerConfigurationDelegate&quot;
-       workingCopyClass=&quot;com.example.ExampleServerConfigurationWorkingCopyDelegate&quot;&gt;
-     &lt;/serverConfigurationType&gt;
-   &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IServerConfigurationDelegate&lt;/b&gt;.

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="copyright"/>

-      </appInfo>

-      <documentation>

-         Copyright (c) 2000, 2003 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made 
-available under the terms of the Common Public License v1.0 which accompanies 
-this distribution, and is available at 
-&lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt;http://www.eclipse.org/legal/cpl-v10.html&lt;/a&gt;

-      </documentation>

-   </annotation>

-

-</schema>

diff --git a/plugins/org.eclipse.wst.server.core/schema/serverLocator.exsd b/plugins/org.eclipse.wst.server.core/schema/serverLocators.exsd
similarity index 91%
rename from plugins/org.eclipse.wst.server.core/schema/serverLocator.exsd
rename to plugins/org.eclipse.wst.server.core/schema/serverLocators.exsd
index c0b0a93..4a0d42d 100644
--- a/plugins/org.eclipse.wst.server.core/schema/serverLocator.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/serverLocators.exsd
@@ -3,7 +3,7 @@
 <schema targetNamespace="org.eclipse.wst.server.core">

 <annotation>

       <appInfo>

-         <meta.schema plugin="org.eclipse.wst.server.core" id="serverLocator" name="Server Locator"/>

+         <meta.schema plugin="org.eclipse.wst.server.core" id="serverLocators" name="Server Locators"/>

       </appInfo>

       <documentation>

          This extension point is used to locate new servers on the local or remote machines.

@@ -75,13 +75,20 @@
                </documentation>

             </annotation>

          </attribute>

-         <attribute name="hosts" type="string">

+         <attribute name="supportsRemoteHosts" type="string" use="required">

             <annotation>

                <documentation>

                   local and/or remote

                </documentation>

             </annotation>

          </attribute>

+         <attribute name="typeIds" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

       </complexType>

    </element>

 

@@ -111,7 +118,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IServerLocatorDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.ServerLocatorDelegate&lt;/b&gt;.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/serverMonitors.exsd b/plugins/org.eclipse.wst.server.core/schema/serverMonitors.exsd
index f766cd5..b6e832a 100644
--- a/plugins/org.eclipse.wst.server.core/schema/serverMonitors.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/serverMonitors.exsd
@@ -75,7 +75,7 @@
                   specifies the fully qualified name of the Java class that implements &lt;samp&gt;IMonitor&lt;/samp&gt;

                </documentation>

                <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>

                </appInfo>

             </annotation>

          </attribute>

@@ -102,7 +102,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IServerMonitorDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.ServerMonitorDelegate&lt;/b&gt;.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/serverTasks.exsd b/plugins/org.eclipse.wst.server.core/schema/serverTasks.exsd
index 3a6009b..b8bf0c6 100644
--- a/plugins/org.eclipse.wst.server.core/schema/serverTasks.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/serverTasks.exsd
@@ -62,11 +62,11 @@
 Server task instances of this type will delegate to instances of this class.

                </documentation>

                <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>

                </appInfo>

             </annotation>

          </attribute>

-         <attribute name="typeIds" type="string">

+         <attribute name="typeIds" type="string" use="required">

             <annotation>

                <documentation>

                   a comma separated list of server type ids that this task may apply to. Used for memory &amp; performance reasons

@@ -96,7 +96,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IServerTaskDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.ServerTaskDelegate&lt;/b&gt;.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/serverTypes.exsd b/plugins/org.eclipse.wst.server.core/schema/serverTypes.exsd
index 057b0c8..812e6b8 100644
--- a/plugins/org.eclipse.wst.server.core/schema/serverTypes.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/serverTypes.exsd
@@ -50,13 +50,6 @@
                </documentation>

             </annotation>

          </attribute>

-         <attribute name="runtimeTypeId" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

          <attribute name="name" type="string" use="required">

             <annotation>

                <documentation>

@@ -71,26 +64,33 @@
                </documentation>

             </annotation>

          </attribute>

-         <attribute name="class" type="string">

+         <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IServerDelegate&lt;/samp&gt;.
-Server instances of this type will delegate to instances of this class.

+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;org.eclipse.wst.server.core.model.ServerDelegate&lt;/samp&gt;.
+Server instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor.

                </documentation>

             </annotation>

          </attribute>

-         <attribute name="workingCopyClass" type="string">

+         <attribute name="behaviourClass" type="string">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IServerWorkingCopyDelegate&lt;/samp&gt;.
-Server instances of this type will delegate to instances of this class.

+                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;org.eclipse.wst.server.core.model.ServerBehaviourDelegate&lt;/samp&gt;.
+Server instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor.

                </documentation>

             </annotation>

          </attribute>

-         <attribute name="configurationTypeId" type="string">

+         <attribute name="hasConfiguration" type="boolean">

             <annotation>

                <documentation>

-                  the id of the server configuration type that this server requires

+                  true if this server has server configuration files

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="runtimeTypeId" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

                </documentation>

             </annotation>

          </attribute>

@@ -115,10 +115,10 @@
                </documentation>

             </annotation>

          </attribute>

-         <attribute name="hosts" type="string">

+         <attribute name="supportsRemoteHosts" type="string">

             <annotation>

                <documentation>

-                  local and/or remote

+                  true if this server type can work with remote host names, false if this server type can only work on localhost. if unspecified, false is assumed

                </documentation>

             </annotation>

          </attribute>

@@ -129,13 +129,6 @@
                </documentation>

             </annotation>

          </attribute>

-         <attribute name="monitorable" type="boolean">

-            <annotation>

-               <documentation>

-                  &quot;true&quot; if the class implements IMonitorableServer, and &quot;false&quot; otherwise

-               </documentation>

-            </annotation>

-         </attribute>

          <attribute name="launchModes" type="string">

             <annotation>

                <documentation>

@@ -143,13 +136,6 @@
                </documentation>

             </annotation>

          </attribute>

-         <attribute name="testEnvironment" type="string">

-            <annotation>

-               <documentation>

-                  &quot;true&quot; if this server should not be creatable unless there is an existing runtime with the test environment flag set to true, &quot;false&quot; otherwise

-               </documentation>

-            </annotation>

-         </attribute>

          <attribute name="initialState" type="string">

             <annotation>

                <documentation>

@@ -164,6 +150,20 @@
                </documentation>

             </annotation>

          </attribute>

+         <attribute name="startTimeout" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="stopTimeout" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

       </complexType>

    </element>

 

@@ -202,7 +202,9 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IServerDelegate&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends the abstract class &lt;b&gt;org.eclipse.wst.server.core.model.ServerDelegate&lt;/b&gt; and has a public 0-arg constructor.

+

+Value of the attribute &lt;b&gt;behaviourClass&lt;/b&gt; must be a fully qualified name of a Java class that extends the abstract class &lt;b&gt;org.eclipse.wst.server.core.model.ServerBehaviourDelegate&lt;/b&gt; and has a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/schema/startup.exsd b/plugins/org.eclipse.wst.server.core/schema/startup.exsd
index 74c6f36..1506bad 100644
--- a/plugins/org.eclipse.wst.server.core/schema/startup.exsd
+++ b/plugins/org.eclipse.wst.server.core/schema/startup.exsd
@@ -58,10 +58,10 @@
          <attribute name="class" type="string" use="required">

             <annotation>

                <documentation>

-                  specifies the fully qualified name of the Java class that implements &lt;samp&gt;IStartup&lt;/samp&gt;

+                  specifies the fully qualified name of the Java class that extends &lt;samp&gt;StartupDelegate&lt;/samp&gt;

                </documentation>

                <appInfo>

-                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.IStartup"/>

+                  <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>

                </appInfo>

             </annotation>

          </attribute>

@@ -92,7 +92,7 @@
          <meta.section type="apiInfo"/>

       </appInfo>

       <documentation>

-         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.wst.server.core.model.IStartup&lt;/b&gt;.

+         Value of the attribute &lt;b&gt;class&lt;/b&gt; must be a fully qualified name of a Java class that extends &lt;b&gt;org.eclipse.wst.server.core.model.StartupDelegate&lt;/b&gt; and contains a public 0-arg constructor.

       </documentation>

    </annotation>

 

diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IClient.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IClient.java
index b4406cd..b45b0de 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IClient.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IClient.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -12,9 +12,6 @@
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.debug.core.ILaunch;
-
-import org.eclipse.wst.server.core.model.IClientDelegate;
-import org.eclipse.wst.server.core.model.ILaunchable;
 /**
  * A launchable client is a client side application or test
  * harness that can be launched (run) against a resource
@@ -24,38 +21,39 @@
  */
 public interface IClient {
 	/**
-	 * Returns the id of the adapter.
-	 *
-	 * @return java.lang.String
+	 * Returns the id of this client. Each known client has a distinct id. 
+	 * Ids are intended to be used internally as keys; they are not
+	 * intended to be shown to end users.
+	 * 
+	 * @return the client id
 	 */
 	public String getId();
 
 	/**
-	 * Returns the label (name) of this client.
-	 * 
-	 * @return java.lang.String
+	 * Returns the displayable name for this client.
+	 * <p>
+	 * Note that this name is appropriate for the current locale.
+	 * </p>
+	 *
+	 * @return a displayable name for this client
 	 */
 	public String getName();
 
 	/**
-	 * Returns the description of this client.
-	 * 
-	 * @return java.lang.String
+	 * Returns the displayable description for this client.
+	 * <p>
+	 * Note that this description is appropriate for the current locale.
+	 * </p>
+	 *
+	 * @return a displayable description for this client
 	 */
 	public String getDescription();
 
 	/**
-	 * Returns the delegate for this launchable client
-	 * 
-	 * @return org.eclipse.wst.server.core.model.ILaunchableClientDelegate
-	 */
-	public IClientDelegate getDelegate();
-
-	/**
 	 * Returns true if this launchable can be run by this client.
 	 * 
-	 * @param server org.eclipse.wst.server.core.model.IServer
-	 * @param launchable org.eclipse.wst.server.core.model.ILaunchable
+	 * @param server org.eclipse.wst.server.core.IServer
+	 * @param launchable org.eclipse.wst.server.core.ILaunchable
 	 * @param launchMode String
 	 * @return boolean
 	 */
@@ -64,11 +62,11 @@
 	/**
 	 * Launches the client.
 	 * 
-	 * @param server org.eclipse.wst.server.core.model.IServer
-	 * @param launchable org.eclipse.wst.server.core.model.ILaunchable
-	 * @param launchMode String
-	 * @param launch org.eclipse.debug.core.ILaunch
-	 * @return org.eclipse.core.runtime.IStatus
+	 * @param server
+	 * @param launchable
+	 * @param launchMode
+	 * @param launch
+	 * @return
 	 */
 	public IStatus launch(IServer server, ILaunchable launchable, String launchMode, ILaunch launch);
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElement.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElement.java
index e43316e..b201748 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElement.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElement.java
@@ -10,9 +10,6 @@
  **********************************************************************/
 package org.eclipse.wst.server.core;
 
-import java.util.List;
-import java.util.Map;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 /**
@@ -93,20 +90,6 @@
 	 * @return boolean
 	 */
 	public boolean isWorkingCopy();
-	
-	/**
-	 * Returns true if there are working copies that have not been saved or released.
-	 * 
-	 * @return boolean
-	 */
-	public boolean isWorkingCopiesExist();
-	
-	/**
-	 * Returns true if there is a working copy that is dirty.
-	 * 
-	 * @return boolean
-	 */
-	public boolean isAWorkingCopyDirty();
 
 	/**
 	 * Returns true if the plugin containing the delegate is loaded.
@@ -122,16 +105,6 @@
 	 */
 	public boolean isDelegateLoaded();
 
-	public int getAttribute(String attributeName, int defaultValue);
-
-	public boolean getAttribute(String attributeName, boolean defaultValue);
-	
-	public String getAttribute(String attributeName, String defaultValue);
-
-	public List getAttribute(String attributeName, List defaultValue);
-
-	public Map getAttribute(String attributeName, Map defaultValue);
-
 	public IStatus validateEdit(Object context);
 	
 	public int getTimestamp();
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElementWorkingCopy.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElementWorkingCopy.java
index a739f46..96135a1 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElementWorkingCopy.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElementWorkingCopy.java
@@ -1,6 +1,6 @@
 /**********************************************************************
  * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -11,8 +11,6 @@
 package org.eclipse.wst.server.core;
 
 import java.beans.PropertyChangeListener;
-import java.util.List;
-import java.util.Map;
 /**
  * Provides additional methods common to working copies of an element.
  * <p>
@@ -22,62 +20,7 @@
  * @since 1.0
  */
 public interface IElementWorkingCopy extends IElement {
-	
-	/**
-	 * Sets the value of the specified integer-valued attribute of this
-	 * element.
-	 * 
-	 * @param id the attribute id
-	 * @param value the value of the specified attribute
-	 * @see IElement#getAttribute(String, int)
-	 */
-	public void setAttribute(String id, int value);
-
-	/**
-	 * Sets the value of the specified boolean-valued attribute of this
-	 * element.
-	 * 
-	 * @param id the attribute id
-	 * @param value the value of the specified attribute
-	 * @see IElement#getAttribute(String, boolean)
-	 */
-	public void setAttribute(String id, boolean value);
-
-	/**
-	 * Sets the value of the specified string-valued attribute of this
-	 * element.
-	 * 
-	 * @param id the attribute id
-	 * @param value the value of the specified attribute
-	 * @see IElement#getAttribute(String, String)
-	 */
-	public void setAttribute(String id, String value);
-
-	/**
-	 * Sets the value of the specified list-valued attribute of this
-	 * element.
-	 * <p>
-	 * [issue: Serialization/deserialization]
-	 * </p>
-	 * 
-	 * @param id the attribute id
-	 * @param value the value of the specified attribute
-	 * @see IElement#getAttribute(String, List)
-	 */
-	public void setAttribute(String id, List value);
-
-	/**
-	 * Sets the value of the specified map-valued attribute of this
-	 * element.
-	 * <p>
-	 * [issue: Serialization/deserialization]
-	 * </p>
-	 * 
-	 * @param id the attribute id
-	 * @param value the value of the specified attribute
-	 * @see IElement#getAttribute(String, Map)
-	 */
-	public void setAttribute(String id, Map value);
+	public static final int TIMESTAMP_ERROR = 5;
 
 	/**
 	 * Sets the displayable name for this element.
@@ -127,15 +70,6 @@
 	 * changes, and <code>false</code> otherwise
 	 */
 	public boolean isDirty();
-	
-	/**
-	 * Releases this working copy.
-	 * <p>
-	 * Element implementations retain internal references to
-	 * extant working copies. Calling this method drop that reference.
-	 * </p>
-	 */
-	public void release();
 
 	/**
 	 * Adds a property change listener to this server.
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ILaunchable.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchable.java
similarity index 71%
rename from plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ILaunchable.java
rename to plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchable.java
index d5a940d..21cc1e2 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ILaunchable.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchable.java
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,7 @@
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  **********************************************************************/
-package org.eclipse.wst.server.core.model;
+package org.eclipse.wst.server.core;
 /**
  * A launchable is a "reference" to a module object. The
  * module object is the actual resource on the server; the
@@ -17,9 +17,11 @@
  */
 public interface ILaunchable {
 	/**
-	 * Returns the id of this launchable.
+	 * Returns the id of this launchable. Each known launchable has a distinct id. 
+	 * Ids are intended to be used internally as keys; they are not
+	 * intended to be shown to end users.
 	 * 
-	 * @return java.lang.String
+	 * @return the launchable id
 	 */
 	public String getId();
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchableAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchableAdapter.java
index c1a25dd..00d949b 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchableAdapter.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchableAdapter.java
@@ -1,6 +1,6 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved.   This program and the accompanying materials
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
@@ -11,36 +11,30 @@
 package org.eclipse.wst.server.core;
 
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.server.core.model.*;
 /**
  * This interface, typically implemented by the server
- * code, converts from an IModuleObject to an
+ * code, converts from an IModuleArtifact to an
  * ILaunchable.
  * 
  * <p>This interface is not intended to be implemented by clients.</p>
  */
 public interface ILaunchableAdapter {
 	/**
-	 * Returns the id of the adapter.
-	 *
-	 * @return java.lang.String
+	 * Returns the id of this adapter. Each known adapter has a distinct id. 
+	 * Ids are intended to be used internally as keys; they are not
+	 * intended to be shown to end users.
+	 * 
+	 * @return the adapter id
 	 */
 	public String getId();
 
 	/**
-	 * Returns the delegate for this launchable adapter.
-	 * 
-	 * @return org.eclipse.wst.server.core.model.ILaunchableAdapterDelegate
-	 */
-	public ILaunchableAdapterDelegate getDelegate();
-
-	/**
 	 * Returns a launchable object from this module object.
 	 * 
-	 * @param server org.eclipse.wst.server.core.model.IServer
-	 * @param moduleObject org.eclipse.wst.server.core.model.IModuleObject
-	 * @param org.eclipse.wst.server.core.model.ILaunchable
-	 * @exception org.eclipse.core.runtime.CoreException
+	 * @param server
+	 * @param moduleObject
+	 * @return
+	 * @exception
 	 */
-	public ILaunchable getLaunchable(IServer server, IModuleObject moduleObject) throws CoreException;
-}
+	public ILaunchable getLaunchable(IServer server, IModuleArtifact moduleObject) throws CoreException;
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModule.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModule.java
similarity index 75%
rename from plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModule.java
rename to plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModule.java
index 39824bb..7f9e8ae 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModule.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModule.java
@@ -8,12 +8,13 @@
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  **********************************************************************/
-package org.eclipse.wst.server.core.model;
+package org.eclipse.wst.server.core;
 
-import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.resources.IModuleResource;
+import org.eclipse.wst.server.core.model.IModuleListener;
 /**
  * A module is a unit of "content" that can be published to a
  * server.
@@ -23,8 +24,8 @@
  * "kinds") is open-ended.
  * </p>
  * <p>
- * All modules are created by module factories
- * ({@link org.eclipse.wst.server.core.IModuleFactory}).
+ * All modules are created by module factories using the moduleFactories
+ * extension point.
  * </p>
  * <p>
  * The content of a module is a collection of file and folder
@@ -38,14 +39,6 @@
  * with.
  * </p>
  * <p>
- * [issue: IModule is something that is exposed to normal 
- * clients; it should move to org.eclipse.wst.server.core package.]
- * </p>
- * <p>
- * [issue: See issues on IModuleType about why it should not
- * be a superinterface of IModule.]
- * </p>
- * <p>
  * [issue: Equality/identify for modules?]
  * </p>
  * <p>
@@ -60,8 +53,7 @@
  * 
  * @since 1.0
  */
-public interface IModule extends IModuleType {
-	
+public interface IModule extends IAdaptable {
 	/**
 	 * Returns the id of this module.
 	 * Each module has a distinct id, used to distinguish this
@@ -74,10 +66,7 @@
 	public String getId();
 
 	/**
-	 * Validates the contents of this module.
-	 * <p>
-	 * [issue: Need to define what the "contents" of a module means.]
-	 * </p>
+	 * Validates this module.
 	 * <p>
 	 * [issue: Conjecture: Each different type of module prescribes
 	 * legal arrangements of, and the significance of, the files within
@@ -99,15 +88,6 @@
 	 * [issue: All existing implementations of this return null,
 	 * which is illegal.]
 	 * </p>
-	 *
-	 * @return a status object with code <code>IStatus.OK</code> if the given
-	 * module is valid, otherwise a status object indicating what is
-	 * wrong with it
-	 */
-	public IStatus validate();
-
-	/**
-	 * Determines whether this module can be published.
 	 * <p>
 	 * [issue: Old comment said: "Returns an IStatus that is used to determine if this object can
 	 * be published to the server." Since the same module can
@@ -115,13 +95,6 @@
 	 * ill-defined.]
 	 * </p>
 	 * <p>
-	 * [issue: How is this predicate different from validate()?]
-	 * </p>
-	 * <p>
-	 * [issue: All existing implementations of this return null,
-	 * which is illegal.]
-	 * </p>
-	 * <p>
 	 * [issue: Old comment said: "Should return an error if there
 	 * is a major problem with the resources, or can be used to
 	 * return warnings on unsaved files, etc." It is usually
@@ -130,10 +103,10 @@
 	 * </p>
 	 *
 	 * @return a status object with code <code>IStatus.OK</code> if the given
-	 * module can be published, otherwise a status object indicating what is
+	 * module is valid, otherwise a status object indicating what is
 	 * wrong with it
 	 */
-	public IStatus canPublish();
+	public IStatus validate(IProgressMonitor monitor);
 
 	/**
 	 * Returns the root resources of this module. All members
@@ -150,7 +123,7 @@
 	 * @return the members of this module
 	 * @throws CoreException [missing]
 	 */
-	public IModuleResource[] members() throws CoreException;
+	//public IModuleResource[] members() throws CoreException;
 
 	/**
 	 * Returns the displayable name for this module.
@@ -163,23 +136,16 @@
 	public String getName();
 
 	/**
-	 * Returns the id of the module factory that created this module.
-	 * <p>
-	 * [issue: What is the rationale for exposing the module factory
-	 * at all. Is there a reason a client would want to know this?]
-	 * </p>
-	 * <p>
-	 * [issue: Consider returning the IModuleFactory instead.]
-	 * </p>
-	 *
-	 * @return the module factory id
+	 * Returns the type of this module.
+	 * 
+	 * @return
 	 */
-	public String getFactoryId();
+	public IModuleType getModuleType();
 
 	/**
 	 * Returns whether this module currently exists.
 	 * <p>
-	 * [issue: The method touches on the important issue
+	 * [issue: The method touches on the important problem
 	 * of when a module ceases to exist. Need to explain
 	 * the full lifecycle of a module.
 	 * Should it be synonymous with the module root 
@@ -191,11 +157,20 @@
 	 * @return <code>true</code> this module currently exists, and
 	 * <code>false</code> if it has been deleted or moved
 	 */
-	public boolean exists();
+	//public boolean exists();
+	
+	/**
+	 * Returns the workbench project that this module is contained in,
+	 * or null if the module is outside of the workspace.
+	 * 
+	 * @return org.eclipse.core.resources.IProject
+	 */
+	public IProject getProject();
 
 	/**
 	 * Add a listener for child module that are added/removed from this
 	 * module.
+	 * Has no effect if an identical listener is already registered.
 	 * 
 	 * @param listener org.eclipse.wst.server.core.model.IModuleListener
 	 */
@@ -204,6 +179,7 @@
 	/**
 	 * Add a listener for child modules that are added/removed from this
 	 * module.
+	 * Has no effect if the listener is not registered.
 	 * 
 	 * @param listener org.eclipse.wst.server.core.model.IModuleListener
 	 */
@@ -214,5 +190,5 @@
 	 *
 	 * @return org.eclipse.wst.server.core.model.IModule[]
 	 */
-	public IModule[] getChildModules();
+	public IModule[] getChildModules(IProgressMonitor monitor);
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleObject.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifact.java
similarity index 65%
rename from plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleObject.java
rename to plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifact.java
index d26f366..babb4f7 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleObject.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifact.java
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,26 +8,27 @@
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.wst.server.core.model.IModule;
+package org.eclipse.wst.server.core;
 /**
  * A module object is a resource within a module,
  * which can be launched on the server. Examples of module
  * objects could include servlets, HTML pages, or EJB beans.
  */
-public interface IModuleObject {
+public interface IModuleArtifact {
 	/**
-	 * Returns the id of this module object.
+	 * Returns the id of this module object. Each known
+	 * module object has a distinct id. 
+	 * Ids are intended to be used internally as keys; they are not
+	 * intended to be shown to end users.
 	 * 
-	 * @return java.lang.String
+	 * @return the module object id
 	 */
 	public String getId();
 
 	/**
 	 * Returns the module that this object is a part of.
 	 * 
-	 * @return org.eclipse.wst.server.core.model.IModule
+	 * @return org.eclipse.wst.server.core.IModule
 	 */
 	public IModule getModule();
-}
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleObjectAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifactAdapter.java
similarity index 61%
rename from plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleObjectAdapter.java
rename to plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifactAdapter.java
index 732623a..d7c41f2 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleObjectAdapter.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifactAdapter.java
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
+ * Copyright (c) 2003, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,9 +9,6 @@
  *     IBM Corporation - Initial API and implementation
  **********************************************************************/
 package org.eclipse.wst.server.core;
-
-import org.eclipse.wst.server.core.model.IModuleObject;
-import org.eclipse.wst.server.core.model.IModuleObjectAdapterDelegate;
 /**
  * A module object adapter converts from some view's model
  * object into a module object that is recognized by the
@@ -19,21 +16,23 @@
  * 
  * <p>This interface is not intended to be implemented by clients.</p>
  */
-public interface IModuleObjectAdapter {
+public interface IModuleArtifactAdapter {
 	/**
-	 * Returns the id of the adapter.
-	 *
-	 * @return java.lang.String
+	 * Returns the id of this adapter. Each known adapter has a distinct id. 
+	 * Ids are intended to be used internally as keys; they are not
+	 * intended to be shown to end users.
+	 * 
+	 * @return the adapter id
 	 */
 	public String getId();
-	
+
 	/**
 	 * Returns the (super) class name that this adapter can work with.
 	 *
 	 * @return java.lang.String
 	 */
 	public String getObjectClassName();
-	
+
 	/**
 	 * Returns true if the plugin that loaded this class has been loaded.
 	 *
@@ -42,17 +41,10 @@
 	public boolean isPluginActivated();	
 
 	/**
-	 * Returns the delegate for this module object adapter.
+	 * Converts from a model object to an IModuleArtifact.
 	 * 
-	 * @return org.eclipse.wst.server.core.model.IModuleObjectAdapterDelegate
+	 * @param obj
+	 * @return
 	 */
-	public IModuleObjectAdapterDelegate getDelegate();
-
-	/**
-	 * Converts from a model object to an IModuleObject.
-	 * 
-	 * @param obj java.lang.Object
-	 * @return org.eclipse.wst.server.core.model.IModuleObject
-	 */
-	public IModuleObject getModuleObject(Object obj);
-}
+	public IModuleArtifact getModuleObject(Object obj);
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleFactory.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleFactory.java
deleted file mode 100644
index afc934b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleFactory.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- *     IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import java.util.List;
-
-import org.eclipse.wst.server.core.model.IModule;
-import org.eclipse.wst.server.core.model.IModuleFactoryDelegate;
-import org.eclipse.wst.server.core.model.IModuleFactoryListener;
-/**
- * A factory for creating modules.
- * <p>
- * The server core framework supports
- * an open-ended set of module factories, which are contributed via
- * the <code>moduleFactories</code> extension point in the server core
- * plug-in. The global list of module factories is available via
- * {@link ServerCore#getModuleFactories()}. 
- * </p>
- * <p>
- * [issue: Module factories have no display name, suggesting that
- * they never need to be shown to users.]
- * </p>
- * <p>
- * [issue: Are module factories SPI-side objects, or do
- * normal clients need access to them?]
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * <p>
- * [issue: It is notoriously difficult to place any kind of
- * useful order on objects that are contributed independently by
- * non-collaborating parties. The IOrdered mechanism is weak, and
- * can't really solve the problem. Issues of presentation are usually
- * best left to the UI, which can sort objects based on arbitrary
- * properties.]
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- * 
- * @since 1.0
- */
-public interface IModuleFactory extends IOrdered {
-
-	/**
-	 * Returns the id of this module factory.
-	 * Each known module factory has a distinct id. 
-	 * Ids are intended to be used internally as keys; they are not
-	 * intended to be shown to end users.
-	 * 
-	 * @return the module factory id
-	 */
-	public String getId();
-	
-	/**
-	 * Returns the types of modules that the factory is capable of
-	 * producing.
-	 * <p>
-	 * [issue: The list returned is precious. You would not want a client
-	 * to accidentally or malicously whack it. Normal practice is to
-	 * return an array instead of a List, and to return a new copy each call.
-	 * This allows the spec to say that the client can do what they want
-	 * with the result, and that it won't change under foot.
-	 * Another alternative is to return a UnmodifiableList implementation
-	 * so that clients cannot modify.]
-	 * </p>
-	 * 
-	 * @return a list of module types (element type: {@link IModuleType})
-	 */
-	public List getModuleTypes();
-	
-	/**
-	 * Returns whether this module factory produces project modules.
-	 * <p>
-	 * [issue: This surfaces the "projects" attribute of the
-	 * moduleFactory element. What is the significance of this?
-	 * (There are no senders of this method.)]
-	 * </p>
-	 *
-	 * @return <code>true</code> if it can produce project modules,
-	 * and <code>false</code> if it cannot
-	 */
-	public boolean isProjectModuleFactory();
-
-	/**
-	 * Returns the delegate for this module factory.
-	 * The module factory delegate is a module-factory-specific object.
-	 * <p>
-	 * [issue: If module factories are SPI-side objects, then
-	 * exposing the delegate is probably fine. If module factories
-	 * are available to clients, you'll want to keep the delegate
-	 * out of the client's hands.]
-	 * </p>
-	 * 
-	 * @return the module factory delegate
-	 */
-	public IModuleFactoryDelegate getDelegate();
-
-	/**
-	 * Finds a module create by this factory with the given id.
-	 * <p>
-	 * [issue: Does this "create" a module with the given id?
-	 * That's what you'd expect of a factory. But a module has
-	 * a module type and module resources, neither of which are
-	 * in evidence. And since a module factory can create
-	 * several types of modules, that seems to rule this out
-	 * as "creating