You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2013/07/26 10:23:42 UTC

[1/3] Renamed org.apache.stratos.tenant.registration.ui to org.apache.stratos.register.ui. Changed product to use org.apache.stratos.register.ui

Updated Branches:
  refs/heads/master 691a0a8ea -> 78c256c09


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
deleted file mode 100644
index f442459..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
+++ /dev/null
@@ -1,51 +0,0 @@
-<!-- 
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~ 
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ 
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<%@ page import="org.wso2.carbon.registry.core.RegistryConstants" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@ page import="org.wso2.carbon.registry.common.ui.UIException" %>
-<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
-<%@ page import="java.util.Enumeration" %>
-<%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-
-<%
-try {
-    boolean domainAvailable = TenantConfigUtil.checkDomainAvailability(request, config, session);
-
-    if (domainAvailable) {
-    %>
-    ----DomainAvailable----
-    <%
-    }
-    else {
-    %>
-    ----DomainUnavailable----
-    <%
-    }
-} catch (UIException e) {
-
-%>
-    Error in checking the domain availability.
-    please retry the registration from the <a href="../tenant-register/select_domain.jsp">start</a>.
-<%
-}
-
-%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
deleted file mode 100644
index 9ce01d5..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
+++ /dev/null
@@ -1,40 +0,0 @@
-<!-- 
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~ 
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ 
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.json.JSONArray" %>
-<%@ page import="org.wso2.carbon.register.ui.clients.PackageInfoServiceClient" %>
-<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
-<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-
-<%
-
-    String backendServerUrl = CarbonUIUtil.getServerURL(config.getServletContext(), session);
-    String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
-    ConfigurationContext configContext =
-            (ConfigurationContext)config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
-    PackageInfoServiceClient client = new PackageInfoServiceClient(cookie, backendServerUrl,configContext);
-    JSONArray packageInfoArray = client.getBillingPackagesJsonArray();
-
-    out.write(packageInfoArray.toString());
-%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif
deleted file mode 100644
index f2a1bc0..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/body-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/body-bg.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/body-bg.gif
deleted file mode 100644
index 5db1464..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/body-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/button-back.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/button-back.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/button-back.gif
deleted file mode 100644
index 6a52e34..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/button-back.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg
deleted file mode 100644
index ebfe8ed..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back.jpg b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back.jpg
deleted file mode 100644
index 62b8da1..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/content-back.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/create-org-button.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/create-org-button.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/create-org-button.gif
deleted file mode 100644
index b7e62a3..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/create-org-button.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif
deleted file mode 100644
index ff3ba26..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif
deleted file mode 100644
index ee4cb66..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif
deleted file mode 100644
index 8f3c2a1..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/features-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/features-bg.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/features-bg.gif
deleted file mode 100644
index dd9e693..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/features-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/footer.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/footer.jpg b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/footer.jpg
deleted file mode 100644
index c617091..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/footer.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/forum.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/forum.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/forum.gif
deleted file mode 100644
index e92779a..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/forum.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/header.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/header.jpg b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/header.jpg
deleted file mode 100644
index 4438a06..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/header.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/help.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/help.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/help.gif
deleted file mode 100644
index 43242c2..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/help.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/images.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/images.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/images.gif
deleted file mode 100644
index 94b46dc..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/images.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif
deleted file mode 100644
index 9029c12..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/logo.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/logo.jpg b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/logo.jpg
deleted file mode 100644
index 202360d..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/logo.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/mailing-list.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/mailing-list.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/mailing-list.gif
deleted file mode 100644
index 06d61e3..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/mailing-list.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/page-back.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/page-back.jpg b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/page-back.jpg
deleted file mode 100644
index 2e21b54..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/page-back.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/people.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/people.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/people.gif
deleted file mode 100644
index edfa49b..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/people.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/services.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/services.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/services.gif
deleted file mode 100755
index 9883116..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/services.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif
deleted file mode 100644
index 640a501..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/thememgt.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/thememgt.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/thememgt.gif
deleted file mode 100644
index e554e87..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/thememgt.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/user-guide.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/user-guide.gif b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/user-guide.gif
deleted file mode 100644
index 9342adc..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/images/user-guide.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
deleted file mode 100755
index e1112fd..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
+++ /dev/null
@@ -1,102 +0,0 @@
-<!-- 
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~ 
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ 
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
-<%@ page import="org.json.JSONArray"%>
-<%@ page import="org.wso2.carbon.CarbonConstants" %>
-<%@ page import="org.wso2.carbon.register.ui.clients.PackageInfoServiceClient" %>
-<%@ page import="org.apache.stratos.common.util.CommonUtil" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
-<%@ page import="java.util.Collections" %>
-<%@ page import="java.util.Enumeration" %>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.List" %>
-<%@ page import="java.util.Map" %>
-<%@ page import="org.json.JSONException" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<carbon:jsi18n
-		resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
-		request="<%=request%>" />
-<script type="text/javascript" src="../registry_common/js/registry_validation.js"></script>
-<script type="text/javascript" src="../registry_common/js/registry_common.js"></script>
-<script type="text/javascript" src="../ajax/js/prototype.js"></script>
-<script type="text/javascript" src="js/register_config.js"></script>
-<script type="text/javascript" src="../admin/js/jquery.js"></script>
-<script type="text/javascript" src="../admin/js/jquery.form.js"></script>
-<script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
-<%
-    String tenantDomain = request.getParameter("domain");
-    // The actual usage plan the tenant selects in select_usage_plan.jsp
-    String selectedUsagePlan = request.getParameter("selectedUsagePlan");
-    session.setAttribute("selectedUsagePlan", selectedUsagePlan);
-    
-    String backendServerUrl = CarbonUIUtil.getServerURL(config.getServletContext(), session);
-    String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
-    ConfigurationContext configContext =
-            (ConfigurationContext)config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-
-    PackageInfoServiceClient client = new PackageInfoServiceClient(cookie, backendServerUrl,configContext);
-    JSONArray packageInfoArray = client.getBillingPackagesJsonArray();
-    String amount = "0";
-
-    for (int i = 0; i < packageInfoArray.length(); i++) {
-        try {
-            if (packageInfoArray.getJSONObject(i).getString("name").equals(selectedUsagePlan)) {
-                amount = packageInfoArray.getJSONObject(i).getString("subscriptionCharge");
-            }
-        } catch (JSONException e) {
-            //
-        }
-    }
-
-    String successUrl;
-    String paypalUrl = CommonUtil.getStratosConfig().getPaypalUrl();
-    String adminConsoleURL = CarbonUIUtil.getAdminConsoleURL(request);
-    adminConsoleURL = adminConsoleURL.substring(0, adminConsoleURL.indexOf("carbon"));
-     successUrl = adminConsoleURL + "carbon/payment/registration_payment.jsp";
-    String cancelUrl = adminConsoleURL + "carbon/admin/login.jsp";
-%>
-
-<script type="text/javascript">
-
-
-        var successUrl = '<%=successUrl%>';
-        var cancelUrl = '<%=cancelUrl%>';
-        var amount = '<%=amount%>';
-        var tenantDomain = '<%=tenantDomain%>';
-        jQuery.ajax({
-            type: 'GET',
-            url: '../payment/setEC-ajaxprocessor.jsp',
-            data: 'successUrl=' + successUrl + '&cancelUrl=' + cancelUrl + '&amount=' + amount + '&tenantDomain=' + tenantDomain,
-            dataType: 'json',
-            async: false,
-            success: function(msg) {
-                var resp = msg;
-                if(resp.ack=='Success'){
-                    location.href = '<%=paypalUrl%>' + resp.token;
-                }else{
-                    location.href = cancelUrl;
-                }
-            },
-            error:function () {
-                location.href = cancelUrl;
-            }
-        });
-</script>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/register_config.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/register_config.js b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/register_config.js
deleted file mode 100644
index fdcd24e..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/register_config.js
+++ /dev/null
@@ -1,147 +0,0 @@
-function addTenant(isPublicCloud) {
-    var domain = document.getElementById('domain');
-    var reason = "";
-    var addTenantForm = document.getElementById('addTenantForm');
-    var adminPassword = "";
-    var adminPasswordRepeat = "";
-    var email = "";
-    var firstname = document.getElementById('admin-firstname');
-    var lastname = document.getElementById('admin-lastname');
-    var adminName = document.getElementById('admin');
-    adminPassword = document.getElementById('admin-password');
-    adminPasswordRepeat = document.getElementById('admin-password-repeat');
-    email = document.getElementById('admin-email');
-
-    // the domain validation part is moved to the select_domain.js
-
-    var reason = validateEmpty(domain, "Domain");
-    if (reason == "") {
-        reason += checkDomain(domain, isPublicCloud);
-    }
-    if (reason == "") {
-        reason += validateEmpty(firstname, "First Name");
-    }
-    if (reason == "") {
-        reason += validateIllegal(firstname, "First Name");
-    }
-    if (reason == "") {
-        reason += validateEmpty(lastname, "Last Name");
-    }
-    if (reason == "") {
-        reason += validateIllegal(lastname, "Last Name");
-    }
-    if (reason == "") {
-        reason += validateEmpty(adminName, "Admin Username");
-    }
-    if (reason == "") {
-        reason += validateIllegal(adminName, "Admin Username");
-    }
-    if (reason == "") {
-        reason += validateUsername(adminName);
-    }
-    if (reason == "") {
-        reason += validateEmpty(adminPassword, "Admin Password");
-    }
-    if (reason == "") {
-        reason += validateAdminPassword(adminPassword);
-    }
-    if (reason == "") {
-        reason += validateEmpty(adminPasswordRepeat, "Admin Password (Repeat)");
-    }
-    if (reason == "") {
-        reason += validateEmpty(email, "Email");
-    }
-    if (reason == "") {
-        reason += validateEmail(email);
-    }
-    if (reason == "") {
-        if (adminPassword.value != adminPasswordRepeat.value) {
-            reason += jsi18n["password.mismatched"];
-        }
-        if (adminPassword.value.length < 6) {
-            reason += jsi18n["password.length"];
-        }
-    }
-    if (reason != "") {
-        CARBON.showWarningDialog(reason);
-        document.getElementbyId("submit-button").disabled = false;
-        document.getElementById('waitMessage').style.display = 'none';
-        return;
-    }
-    addTenantForm.submit();
-}
-
-function validateAdminPassword(fld) {
-    var error = "";
-
-    if (fld.value == "") {
-        error = org_wso2_carbon_registry_common_ui_jsi18n["no.password"] + "<br />";
-    } /* else if ((fld.value.length < 3) || (fld.value.length > 15)) {
-     error = org_wso2_carbon_registry_common_ui_jsi18n["wrong.password"] + "<br />";
-     } else if (illegalChars.test(fld.value)) {
-     error = org_wso2_carbon_registry_common_ui_jsi18n["illegal.password"] + "<br />";
-     } else if (!((fld.value.search(/(a-z)+/)) && (fld.value.search(/(0-9)+/)))) {
-     error = "The password must contain at least one numeral.<br />";
-     } */ else {
-        fld.style.background = 'White';
-    }
-    return error;
-}
-
-function activationChanged(cbox, domain) {
-    if (!cbox.checked) {
-        CARBON.showConfirmationDialog("Are you sure you want to deactivate the domain: " +
-                                      domain + ".", function() {
-            var submitForm = document.getElementById(domain + "_form");
-            submitForm.submit();
-        }, function() {
-            cbox.checked = "on";
-        });
-    } else {
-        var submitForm = document.getElementById(domain + "_form");
-        submitForm.submit();
-    }
-}
-
-function fillAdminValue() {
-    var adminValue = document.getElementById('adminValue');
-    var domain = document.getElementById('domain');
-
-    var reason = validateIllegal(domain, "Domain");
-    if (reason != "") {
-        CARBON.showErrorDialog(reason);
-        adminValue.innerHTML = '';
-        return;
-    }
-
-    if (domain.value == "") {
-        adminValue.innerHTML = '' + domain.value;
-    }
-    else {
-        adminValue.innerHTML = '@' + domain.value;
-    }
-}
-
-function showregistrationfail() {
-    var error = "";
-    CARBON.showWarningDialog(error);
-}
-
-var kaptchaImgUrl;
-function showKaptcha(kaptchaImgUrlArg) {
-    kaptchaImgUrl = kaptchaImgUrlArg;
-    var kaptchaImgDiv = document.getElementById("kaptchaImgDiv");
-    kaptchaImgDiv.innerHTML = "<img src='../tenant-register/images/ajax-loader.gif' alt='busy'/>";
-    setTimeout("showKaptchaTimely()", 4000);
-}
-
-function showKaptchaTimely() {
-    var kaptchaImgDiv = document.getElementById("kaptchaImgDiv");
-    kaptchaImgDiv.innerHTML = "<img src='" + kaptchaImgUrl + "' alt='If you can not see the captcha " +
-                              "image please refresh the page or click the link again.'/>";
-}
-
-function activateSubmit(fld) {
-    var submitButton = document.getElementById('submit-button');
-    submitButton.disabled = !fld;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/select_domain.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/select_domain.js b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/select_domain.js
deleted file mode 100644
index 592e308..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/js/select_domain.js
+++ /dev/null
@@ -1,75 +0,0 @@
-function checkDomainAvailability(isPublicCloud) {
-    var domain = document.getElementById('domain');
-
-    var reason = validateEmpty(domain, "Domain");
-    if (reason == "") {
-        reason += checkDomain(domain, isPublicCloud);
-    }
-
-    if(reason != "") {
-        CARBON.showWarningDialog(reason);
-        return false;
-    }
-
-    var busyCheck = document.getElementById("busyCheck");
-    busyCheck.innerHTML = "<img src=\"images/ajax-loader.gif\"/>";
-    
-    var domain_confirmation_div = document.getElementById("domain-confirmation-msg");
-    
-    new Ajax.Request('../tenant-register/domain_availability_ajaxprocessor.jsp',
-    {
-        method:'post',
-        parameters: {domain: domain.value},
-
-        onSuccess: function(transport) {
-            busyCheck.innerHTML = "";
-            var returnValue = transport.responseText;
-            if (returnValue.search(/----DomainAvailable----/) == -1) {
-                domain_confirmation_div.style.color = "#f00";
-                domain_confirmation_div.innerHTML = jsi18n["domain.unavailable"]; 
-                result = false;
-            } else {
-                domain_confirmation_div.style.color = "#058000";
-                domain_confirmation_div.innerHTML = jsi18n["domain.available"];
-                result = true;
-            }
-        },
-
-        onFailure: function(transport){
-            busyCheck.innerHTML = "";
-        }
-    });
-}
-
-function clearDomainConfirmationMsg() {
-    var domain_confirmation_div = document.getElementById("domain-confirmation-msg");
-    domain_confirmation_div.innerHTML = "";
-}
-
-
-function checkDomain(fld, isPublicCloudSetup)
-{
-    var error = "";
-    var domain = fld.value;
-    var lastIndexOfDot = domain.lastIndexOf(".");
-    var indexOfDot = domain.indexOf(".");
-    var extension = domain.substring(lastIndexOfDot, domain.length);
-
-    var illegalChars = /([^a-zA-Z0-9\._\-])/; // allow only letters and numbers . - _and period
-    if (extension.indexOf("-trial") >= 0 || extension.indexOf("-unverified") >= 0) {
-        // we are not allowing to create a domain with -trial or -unverified is in the extension
-        error = "The domain name you entered is not valid. Please enter a valid domain name.";
-    }
-    else if (isPublicCloudSetup && (lastIndexOfDot <= 0)) {
-        error = "Invalid domain: " + domain + ". You should have an extension to your domain.";
-    }
-    else if (indexOfDot == 0) {
-        error = "Invalid domain, starting with '.'";
-    }
-    else if (illegalChars.test(fld.value)) {
-        error = "The domain only allows letters, numbers, '.', '-' and '_'. <br />";
-    } else {
-        fld.style.background = 'White';
-    }
-    return error;
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_domain.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_domain.jsp b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_domain.jsp
deleted file mode 100644
index 303a38e..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_domain.jsp
+++ /dev/null
@@ -1,390 +0,0 @@
-<!-- 
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~ 
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ 
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<%@ page import="org.apache.stratos.common.constants.StratosConstants" %>
-<%@ page import="org.apache.stratos.common.util.CommonUtil" %>
-<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
-<%@ page import="org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
-<script type="text/javascript" src="../registry_common/js/registry_validation.js"></script>
-<script type="text/javascript" src="../registry_common/js/registry_common.js"></script>
-<script type="text/javascript" src="../ajax/js/prototype.js"></script>
-<script type="text/javascript" src="js/select_domain.js"></script>
-<script type="text/javascript" src="../admin/js/jquery.js"></script>
-<script type="text/javascript" src="../admin/js/jquery.form.js"></script>
-<script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
-<script type="text/javascript" src="../googleanalytics/js/googleAnalyticsProcessor.js"></script>
-<carbon:jsi18n
-        resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
-        request="<%=request%>"/>
-<fmt:bundle basename="org.wso2.carbon.register.ui.i18n.Resources">
-
-<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
-<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
-<script type="text/javascript" src="js/register_config.js"></script>
-<script type="text/javascript">
-
-    var packageInfo;
-    
-    function setFreeUsagePlan() {
-        var foundFreePlan = false;
-        for (var i = 0; i < packageInfo.length; i++) {
-            if (packageInfo[i].subscriptionCharge == "0") {
-                document.getElementById("selectedUsagePlan").value = packageInfo[i].name;
-                foundFreePlan = true;
-                return;
-            }
-        }
-        if(!foundFreePlan) {
-            document.getElementById("selectedUsagePlan").value = packageInfo[0].name;
-        }
-    }
-
-    jQuery(document).ready(
-                          function() {
-                              jQuery.ajax({
-                                  type: 'POST',
-                                  url: 'get_package_info_ajaxprocessor.jsp',
-                                  dataType: 'json',
-                                  data: 'plan=0',
-                                  async: false,
-                                  success: function(data) {
-                                      packageInfo = data;
-                                  },
-                                  error:function (xhr, ajaxOptions, thrownError) {
-                                      CARBON.showErrorDialog('Could not get package information.');
-                                  }
-                              });
-
-                          }
-            );
-</script>
-
-
-<%
-    String domainName = "";
-    String admin = "";
-    String email = "";
-    String firstname = "";
-    String lastname = "";
-    String usagePlan = "";
-    String license = CommonUtil.getEula();
-    boolean isPublicCloud = CommonUtil.isPublicCloudSetup();
-
-    session.setAttribute(StratosConstants.ORIGINATED_SERVICE,
-            request.getParameter(StratosConstants.ORIGINATED_SERVICE));
-    String domain = (String) session.getAttribute("temp-domain-to-register");
-    if (domain == null) {
-        domain = "";
-    }
-    session.removeAttribute("temp-domain-to-register");
-    // hm, i'm not sure whether we really need to clear the success key, if someone in the same session
-    // have succeeded validating the domain, we should let them ignore the validation step. but if
-    // someone look at this without much investigation, he may think this is a bug, so thought of clearing
-    // it anyway...
-    session.removeAttribute("validate-domain-success-key");
-    if ("false".equals(session.getAttribute("temp-domain-available"))) {
-        session.removeAttribute("temp-domain-available");
-%>
-
-<script type="text/javascript">
-    jQuery(document).ready(function() {
-        CARBON.showWarningDialog(jsi18n["domain.unavailable"]);
-    });
-</script>
-<%
-    }
-%>
-<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
-
-<%
-    CaptchaInfoBean captchaInfoBean;
-    try {
-        captchaInfoBean = TenantConfigUtil.generateRandomCaptcha(config, session);
-    } catch (Exception e) {
-        return;
-    }
-    String captchaImagePath = captchaInfoBean.getImagePath();
-
-    String captchaImageUrl = "../../" + captchaImagePath;
-    String captchaSecretKey = captchaInfoBean.getSecretKey();
-
-    if (session.getAttribute("submit-domain") != null) {
-        domain = (String) session.getAttribute("submit-domain");
-        session.setAttribute("submit-domain", null);
-    }
-    if (session.getAttribute("submit-admin") != null) {
-        admin = (String) session.getAttribute("submit-admin");
-        session.setAttribute("submit-admin", null);
-    }
-    if (session.getAttribute("submit-admin-email") != null) {
-        email = (String) session.getAttribute("submit-admin-email");
-        session.setAttribute("submit-admin-email", null);
-    }
-    if (session.getAttribute("submit-admin-firstname") != null) {
-        firstname = (String) session.getAttribute("submit-admin-firstname");
-        session.setAttribute("submit-admin-firstname", null);
-    }
-    if (session.getAttribute("submit-admin-lastname") != null) {
-        lastname = (String) session.getAttribute("submit-admin-lastname");
-        session.setAttribute("submit-admin-lastname", null);
-    }
-%>
-
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-
-<%
-    if ("failed".equals(session.getAttribute("kaptcha-status"))) {
-        session.setAttribute("kaptcha-status", null);
-%>
-
-<script type="text/javascript">
-    jQuery(document).ready(function() {
-        CARBON.showWarningDialog('Please enter the letters shown as in the image to register.');
-    });
-</script>
-<%
-    }
-
-    if ("true".equals(session.getAttribute("add-tenant-failed"))) {
-        session.removeAttribute("add-tenant-failed");
-%>
-
-<script type="text/javascript">
-    jQuery(document).ready(function() {
-        CARBON.showWarningDialog('Organization registration failed. Please try again with a different domain.');
-    });
-</script>
-<%
-    }
-%>
-<script type="text/javascript">
-    jQuery(document).ready(function() {
-
-        jQuery(".toggle_container").show();
-        /*Hide (Collapse) the toggle containers on load use show() instead of hide() in the
-         above code if you want to keep the content section expanded. */
-
-        jQuery("h2.trigger").click(function() {
-            if (jQuery(this).next().is(":visible")) {
-                this.className = "active trigger";
-            } else {
-                this.className = "trigger";
-            }
-
-            jQuery(this).next().slideToggle("fast");
-            return false; //Prevent the browser jump to the link anchor
-        });
-    });
-</script>
-<div id="middle">
-
-    <h2><fmt:message key="register.new.organization"/></h2>
-
-    <div id="workArea">
-        <div class="registration_help"><fmt:message key="required.msg"/></div>
-        <div id="activityReason" style="display: none;"></div>
-        <form id="addTenantForm" action="submit_tenant_ajaxprocessor.jsp" method="post">
-
-            <table class="styledLeft">
-                <tbody>
-                <tr>
-                    <td class="nopadding">
-                        <h2 class="trigger"><a href="#"><fmt:message key="domain.information"/></a></h2>
-
-                        <div class="toggle_container">
-                            <table class="normal-nopadding" cellspacing="0">
-                                <tbody>
-                                <tr>
-                                    <td class="leftCol-med"><fmt:message key="domain"/><span class="required">*</span>
-                                    </td>
-                                    <td colspan="2"><input onblur="fillAdminValue()"
-                                                           value="<%=domain%>" type="text"
-                                                           name="domain" id="domain"
-                                                           style="width:400px" value=""/>
-                                        <input type="button" value="Check Availability"
-                                               onclick="checkDomainAvailability(<%=isPublicCloud?"true":"false"%>)"/> <span
-                                                id="busyCheck"></span>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td></td>
-                                    <td colspan="2">Provide a domain for your tenant, in the
-                                        format "example.com". This domain should be unique.
-                                        If this is a legitimate domain, optionally you will be able to validate the ownership of the domain.
-                                    </td>
-                                </tr>
-
-                                <tr>
-                                    <td></td>
-                                    <td colspan="2">
-                                        <div id="domain-confirmation-msg"></div>
-                                    </td>
-                                </tr>
-
-                                <tr>
-                                    <td></td>
-                                    <td colspan="2">
-                                        <input type="checkbox" name="domain-confirmation"
-                                               value="yes">Validate the domain now
-                                        (optional)</input>
-                                    </td>
-                                </tr>
-
-                                </tbody>
-                            </table>
-                        </div>
-
-                        <h2 class="trigger"><a href="#"><fmt:message key="contact.details"/></a></h2>
-
-                        <div class="toggle_container">
-                            <table class="normal-nopadding" cellspacing="0">
-                                <tbody>
-                                <tr>
-                                    <td class="leftCol-med"><fmt:message key="admin.firstname"/><span
-                                            class="required">*</span></td>
-                                    <td><input type="text" name="admin-firstname" id="admin-firstname"
-                                               style="width:400px" value="<%=firstname%>"/></td>
-                                </tr>
-                                <tr>
-                                    <td><fmt:message key="admin.lastname"/><span class="required">*</span></td>
-                                    <td><input type="text" name="admin-lastname" id="admin-lastname" style="width:400px"
-                                               value="<%=lastname%>"/></td>
-                                </tr>
-                                <tr>
-                                    <td><fmt:message key="admin.username"/><span class="required">*</span></td>
-                                    <td><input type="text" name="admin" id="admin" style="width:400px"
-                                               value="<%=admin%>"/><span id="adminValue"></span></td>
-                                </tr>
-                                <tr>
-                                    <td><fmt:message key="admin.password"/>
-                                        <span class="required">*</span></td>
-                                    <td><input type="password" name="admin-password" id="admin-password"
-                                               style="width:400px"/></td>
-                                </tr>
-                                <tr>
-                                    <td></td>
-                                    <td class="registration_help">(Minimum of 6 Characters in length)</td>
-                                </tr>
-                                <tr>
-                                    <td><fmt:message key="admin.password.repeat"/>
-                                        <span class="required">*</span></td>
-                                    <td><input type="password" name="admin-password-repeat" id="admin-password-repeat"
-                                               style="width:400px"/></td>
-                                </tr>
-                                <tr>
-                                    <td class="leftCol-med"><fmt:message key="admin.email"/><span
-                                            class="required">*</span></td>
-                                    <td colspan="2"><input type="text" name="admin-email" id="admin-email"
-                                                           style="width:400px" value="<%=email%>"/></td>
-                                </tr>
-                                <tr>
-                                    <td class="leftCol-med"><fmt:message key="word.verification"/><span
-                                            class="required">*</span></td>
-                                    <td colspan="2"><fmt:message key="captcha.message"/></td>
-                                </tr>
-                                <tr>
-                                    <td></td>
-                                    <td colspan="2">
-                                        <div id="kaptchaImgDiv"></div>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td></td>
-                                    <td colspan="2" height="100"><input type="text" id="captcha-user-answer"
-                                                                        name="captcha-user-answer" style="width:400px"
-                                                                        value=""/></td>
-                                </tr>
-                                </tbody>
-                            </table>
-                        </div>
-
-                        <%
-                            if (isPublicCloud) {
-                        %>
-                        <h2 class="trigger"><a href="#"><fmt:message key="terms.of.use"/></a></h2>
-
-                        <div class="toggle_container">
-                            <table class="normal-nopadding" cellspacing="0">
-                                <tbody>
-
-
-                                <tr></tr>
-                                <tr>
-                                    <td>
-                                        <textarea rows="10" readonly="readonly" name="license-text"
-                                                  style="width:100%"><%=license%>
-                                        </textarea>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td><input type="checkbox" name="activateButton" id="activateButton"
-                                               onclick="activateSubmit(form.activateButton.checked)"/>
-                                        <label for="activateButton"><fmt:message key="accept.eula"/></label></td>
-                                </tr>
-                                <%
-                                    }
-                                %>
-
-
-                                </tbody>
-                            </table>
-                        </div>
-                    </td>
-                </tr>
-                <tr id="buttonRow" colspan="2">
-                    <td class="buttonRow">
-                        <input type="hidden" name="selectedUsagePlan" id="selectedUsagePlan"/>
-                        <input type="hidden" name="captcha-secret-key" value="<%=captchaSecretKey%>"/>
-                        <%
-                            if (isPublicCloud) {
-                        %>
-                        <input class="button" id="submit-button" type="button" disabled="disabled" style="float:left; margin-top:4px"
-                               value="Next >" onclick="setFreeUsagePlan();addTenant();jQuery(this).attr('disabled', true);jQuery('#waitMessage').toggle('fast')"/>
-                        <%
-                        } else {
-                        %>
-                        <input class="button" id="submit-button" type="button" style="float:left; margin-top:4px"
-                               value="Next >" onclick="setFreeUsagePlan();addTenant();jQuery(this).attr('disabled', true);jQuery('#waitMessage').toggle('fast')"/>
-                        <%
-                            }
-                        %>
-                        <div id="waitMessage" style="font-size:13px !important;margin-top:5px; float:left;display:none"><img
-                                src="images/ajax-loader.gif" align="left" hspace="20"/>Registering new tenant ...
-                        </div>
-                        <div style="clear:both"></div>
-                    </td>
-                </tr>
-                </tbody>
-            </table>
-        </form>
-        <br/>
-    </div>
-</div>
-<script type="text/javascript">
-    showKaptcha('<%=captchaImageUrl%>');
-</script>
-</fmt:bundle>
-
-

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp
deleted file mode 100644
index cf90ed4..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp
+++ /dev/null
@@ -1,280 +0,0 @@
-<!-- 
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~ 
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ 
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<%@ page import="org.apache.stratos.common.constants.StratosConstants" %>
-<%@ page import="org.apache.stratos.common.util.CommonUtil" %>
-<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
-<%@ page import="org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
-<script type="text/javascript" src="../registry_common/js/registry_validation.js"></script>
-<script type="text/javascript" src="../registry_common/js/registry_common.js"></script>
-<script type="text/javascript" src="../ajax/js/prototype.js"></script>
-<script type="text/javascript" src="js/select_domain.js"></script>
-<script type="text/javascript" src="../admin/js/jquery.js"></script>
-<script type="text/javascript" src="../admin/js/jquery.form.js"></script>
-<script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
-<script type="text/javascript" src="../googleanalytics/js/googleAnalyticsProcessor.js"></script>
-<carbon:jsi18n
-        resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
-        request="<%=request%>"/>
-<fmt:bundle basename="org.wso2.carbon.register.ui.i18n.Resources">
-
-<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
-<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
-<script type="text/javascript" src="js/register_config.js"></script>
-<script type="text/javascript">
-
-<%
-    boolean chargeOnRegistration = CommonUtil.isChargedOnRegistration();
-    String regDomain = (String)session.getAttribute("regTenantDomain");
-%>
-    var packageInfo;
-    function showRentalMessage() {
-
-        if (packageInfo == null) {
-            jQuery.ajax({
-                type: 'POST',
-                url: 'get_package_info_ajaxprocessor.jsp',
-                dataType: 'json',
-                data: 'plan=0',
-                async: false,
-                success: function(data) {
-                    packageInfo = data;
-                },
-                error:function (xhr, ajaxOptions, thrownError) {
-                    CARBON.showErrorDialog('Could not get package information.');
-                }
-            });
-        }
-
-        var plan = document.getElementById('selectedUsagePlan').
-                options[document.getElementById('selectedUsagePlan').selectedIndex].value;
-        var charge;
-        for (var i = 0; i < packageInfo.length; i++) {
-            if (packageInfo[i].name == plan) {
-                charge = packageInfo[i].subscriptionCharge;
-                break;
-            }
-
-        }
-
-        document.getElementById('packagePrice').innerHTML = '<b>' + '<fmt:message key="billing.currency"/>' + charge + " per month" + '</b>';
-
-    }
-
-    function makePayment() {
-        var selectEl = document.getElementById("selectedUsagePlan");
-        var selectedUsagePlan = selectEl.options[selectEl.selectedIndex].value;
-        var regTenantDomain = '<%= regDomain%>';
-
-
-        for (var i = 0; i < packageInfo.length; i++) {
-        <% if (chargeOnRegistration) { %>
-            if (packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge != "0") {
-                CARBON.showConfirmationDialog('<fmt:message key="redirect.to.paypal.msg1"/>' + " " + '<fmt:message key="billing.currency"/>' + packageInfo[i].subscriptionCharge +
-                                              ". " + '<fmt:message key="redirect.to.paypal.msg2"/>', function() {
-                    document.getElementById('waitMessage').style.display = 'block';
-                    document.forms["selectUsagePlan"].submit();
-                }, function () {
-                    document.getElementById('submit-button').removeAttribute('disabled');
-                })
-
-            } else if (packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge == "0") {
-                location.href = "../tenant-register/success_register.jsp";
-                break;
-            }
-            <% } else { %>
-                if(packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge != "0") {
-                    jQuery.ajax({
-                        type: 'POST',
-                        url: '../payment/upgrade_registration_usage_plan_ajaxprocessor.jsp',
-                        data: {selectedUsagePlan: selectedUsagePlan, regTenantDomain: regTenantDomain},
-                        async: false,
-                        success: function(msg) {
-                    }});
-                    location.href = "../tenant-register/success_register.jsp";
-                    break;
-                } else if (packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge == "0") {
-                    location.href = "../tenant-register/success_register.jsp";
-                    break;
-                }
-        <% } %>
-
-        }
-    }
-
-    function cancelPaymet() {
-        location.href = "../tenant-register/success_register.jsp";
-    }
-
-    jQuery(document).ready(
-                          function() {
-                              jQuery.ajax({
-                                  type: 'POST',
-                                  url: 'get_package_info_ajaxprocessor.jsp',
-                                  dataType: 'json',
-                                  data: 'plan=0',
-                                  async: false,
-                                  success: function(data) {
-                                      packageInfo = data;
-                                  },
-                                  error:function (xhr, ajaxOptions, thrownError) {
-                                      CARBON.showErrorDialog('Could not get package information.');
-                                  }
-                              });
-
-                              var charge;
-                              var name;
-                              for (var i = 0; i < packageInfo.length; i++) {
-                                  charge = packageInfo[i].subscriptionCharge;
-                                  name = packageInfo[i].name;
-                                  option = document.createElement("option");
-                                  option.value = name;
-                                  option.innerHTML = name;
-                                  document.getElementById('selectedUsagePlan').appendChild(option);
-
-                              }
-                          }
-            );
-</script>
-
-
-<%
-    boolean isPublicCloud = CommonUtil.isPublicCloudSetup();
-
-    session.setAttribute(StratosConstants.ORIGINATED_SERVICE,
-            request.getParameter(StratosConstants.ORIGINATED_SERVICE));
-    String domain = (String) session.getAttribute("temp-domain-to-register");
-    if (domain == null) {
-        domain = "";
-    }
-    session.removeAttribute("temp-domain-to-register");
-    // hm, i'm not sure whether we really need to clear the success key, if someone in the same session
-    // have succeeded validating the domain, we should let them ignore the validation step. but if
-    // someone look at this without much investigation, he may think this is a bug, so thought of clearing
-    // it anyway...
-    session.removeAttribute("validate-domain-success-key");
-    if ("false".equals(session.getAttribute("temp-domain-available"))) {
-        session.removeAttribute("temp-domain-available");
-%>
-
-<script type="text/javascript">
-    jQuery(document).ready(function() {
-        CARBON.showWarningDialog(jsi18n["domain.unavailable"]);
-    });
-</script>
-<%
-    }
-%>
-<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-
-<script type="text/javascript">
-    jQuery(document).ready(function() {
-
-        jQuery(".toggle_container").show();
-        /*Hide (Collapse) the toggle containers on load use show() instead of hide() in the
-         above code if you want to keep the content section expanded. */
-
-        jQuery("h2.trigger").click(function() {
-            if (jQuery(this).next().is(":visible")) {
-                this.className = "active trigger";
-            } else {
-                this.className = "trigger";
-            }
-
-            jQuery(this).next().slideToggle("fast");
-            return false; //Prevent the browser jump to the link anchor
-        });
-    });
-
-</script>
-<div id="middle">
-
-    <h2><fmt:message key="register.new.organization"/></h2>
-
-    <div id="workArea">
-        <div class="registration_help"><fmt:message key="required.msg"/></div>
-        <div id="activityReason" style="display: none;"></div>
-        <form id="selectUsagePlan" action="init_payment_ajaxprocessor.jsp" method="post">
-
-            <table class="styledLeft">
-                <tbody>
-                <tr>
-                    <td class="nopadding">
-                        <h2 class="trigger"><a href="#"><fmt:message key="usage.plan.information"/></a></h2>
-
-                        <div class="toggle_container">
-                            <table class="normal-nopadding" cellspacing="0">
-                                <tbody>
-                                <tr>
-                                    <td class="leftCol-med">
-                                        <fmt:message key="select.usage.plan.for.tenant"/><span class="required">*</span>
-                                    </td>
-                                    <td colspan="2">
-                                        <select name="selectedUsagePlan" id="selectedUsagePlan"
-                                                onchange="showRentalMessage();">
-                                        </select>
-                                        <a href="<%=CommonUtil.getStratosConfig().getUsagePlanURL()%>" target="_blank">
-                                            <b>Pricing Info</b>
-                                        </a>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td></td>
-                                    <td colspan="2" id="packagePrice" class="registration_help"><b><fmt:message
-                                            key="demo.package.price"/></b></td>
-                                </tr>
-                                <tr>
-                                    <td></td>
-                                    <td colspan="2" class="registration_help"><fmt:message
-                                            key="select.package.message"/>
-                                    </td>
-                                </tr>
-                                </tbody>
-                            </table>
-                        </div>                        
-                    </td>
-                </tr>
-                <tr id="buttonRow">
-                    <td class="buttonRow">
-                        <input class="button" id="submit-button" type="button" style="float:left; margin-top:4px; margin-right:4px;"
-                               value="Submit" onclick="makePayment();jQuery(this).attr('disabled', true)"/>
-                        <input class="button" id="cancel-button" type="button" style="float:left; margin-top:4px"
-                               value="Cancel" onclick="cancelPaymet()"/>
-                        <div id="waitMessage" style="font-size:13px !important;margin-top:5px; float:left; display:none"><img
-                                src="images/ajax-loader.gif" align="left" hspace="20"/>Connecting to PayPal ...
-                        </div>
-                        <div style="clear:both"></div>
-                    </td>
-                </tr>
-                </tbody>
-            </table>
-        </form>
-        <br/>
-    </div>
-</div>
-</fmt:bundle>
-
-

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
deleted file mode 100644
index 754e5bf..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
+++ /dev/null
@@ -1,67 +0,0 @@
-<!-- 
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~ 
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ 
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
-<%@ page import="org.apache.stratos.common.constants.StratosConstants"%>
-<%@ page import="org.wso2.carbon.captcha.mgt.constants.CaptchaMgtConstants"%>
-<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<carbon:jsi18n
-		resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
-		request="<%=request%>" />
-<%
-
-    try {
-        String gotoConfirmDomain = request.getParameter("domain-confirmation");
-        String domain = request.getParameter("domain");
-
-        String key = TenantConfigUtil.registerTenantConfigBean(request, config, session);
-
-        session.removeAttribute(StratosConstants.ORIGINATED_SERVICE);
-        session.setAttribute("add-tenant-success", "true");
-        session.setAttribute("regTenantDomain", domain);
-
-        String contextPath = "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/" + request.getParameter("domain");
-        //response.sendRedirect(contextPath + "/carbon/tenant-theme/theme_mgt.jsp?redirectWith=" + key);
-        // now we send the login page.
-
-       // response.sendRedirect(contextPath + "/carbon/admin/login.jsp");
-
-        if (gotoConfirmDomain != null && gotoConfirmDomain.equals("yes")) {
-            // send me to the domain validation form
-            response.sendRedirect("../validate-domain/validate_domain_not_logged_in.jsp?domain=" + domain);
-        }
-        else {
-            // send me direct to the add tenant form, without successkey they will add the suffix -unverified
-            response.sendRedirect("../tenant-register/select_usage_plan.jsp");
-        }
-
-    } catch (Exception e) {
-        String msg = e.getMessage();
-        TenantConfigUtil.setSubmissionValuesForSession(request);
-        if (msg.contains(CaptchaMgtConstants.CAPTCHA_ERROR_MSG)) {
-            session.setAttribute("kaptcha-status", "failed");
-        } else {
-        session.setAttribute("add-tenant-failed", "true");
-        }
-        response.sendRedirect("../tenant-register/select_domain.jsp");
-        return;
-    }
-%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/success_register.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/success_register.jsp b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/success_register.jsp
deleted file mode 100644
index 15c4d8b..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/success_register.jsp
+++ /dev/null
@@ -1,77 +0,0 @@
-<!-- 
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~ 
-  ~ http://www.apache.org/licenses/LICENSE-2.0
-  ~ 
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<link href="css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
-
-<%
-    // String contextPath = "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/" + request.getParameter("domain");
-%>
-<div id="middle">
-
-    <h2>
-        Account Created Successfully
-    </h2>
-
-    <div id="workArea">
-
-       <h3>Congratulations! You have successfully created an account for your organization with WSO2 Stratos. </h3>
-
-        <p style="font-size:16px" align="left">
-        A confirmation email has been sent to your email address for this account. Please follow the instructions in the email to activate the account.
-        After that login from the <a href="/carbon/admin/login.jsp"> <b>login page</b></a>.
-        </p>
-    </div>
-
-
-    <div class="clear"></div>
-    <div class="features">
-        <div class="feature">
-            <img src="images/feature-01-icon.gif"/>
-
-            <h2>Elasticity</h2>
-
-            <p>
-                Stratos manages your underlying cloud infrastructure to seamlessly handle the scalability demands of
-                your application.
-            </p>
-        </div>
-        <div class="feature">
-            <img src="images/feature-02-icon.gif"/>
-
-            <h2>Multi-tenancy</h2>
-
-            <p>
-                Departments, developer groups, or projects run fully independently, but share the same middleware
-                platform for maximum resource utilization.
-            </p>
-        </div>
-        <div class="feature">
-            <img src="images/feature-03-icon.gif"/>
-
-            <h2>Self Provisioning</h2>
-
-            <p>
-                Authorized users can provision new tenants from a web portal in moments.
-            </p>
-        </div>
-        <div class="clear"></div>
-    </div>
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index 2dfb58c..c244696 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -63,6 +63,7 @@
 		<module>org.apache.stratos.mediator.autoscale</module>
            	<module>org.apache.stratos.autoscaler.service</module>
 		<!-- Tenant Mgt -->
+		<module>org.apache.stratos.register.ui</module>
 		<module>org.apache.stratos.tenant.mgt.core</module>
 		<module>org.apache.stratos.tenant.mgt</module>
 		<module>org.apache.stratos.tenant.mgt.ui</module>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/products/stratos_controller/modules/features/service/org.apache.stratos.ui.feature/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos_controller/modules/features/service/org.apache.stratos.ui.feature/pom.xml b/products/stratos_controller/modules/features/service/org.apache.stratos.ui.feature/pom.xml
index bf04fd7..450c14d 100755
--- a/products/stratos_controller/modules/features/service/org.apache.stratos.ui.feature/pom.xml
+++ b/products/stratos_controller/modules/features/service/org.apache.stratos.ui.feature/pom.xml
@@ -76,9 +76,9 @@
 		<version>${project.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.wso2.carbon</groupId>
-                <artifactId>org.wso2.carbon.register.ui</artifactId>
-		<version>2.1.1</version>
+                <groupId>org.apache.stratos</groupId>
+                <artifactId>org.apache.stratos.register.ui</artifactId>
+		<version>${project.version}</version>
             </dependency>
             <!--<dependency>
                 <groupId>org.wso2.carbon</groupId>
@@ -100,15 +100,10 @@
                 <artifactId>org.wso2.carbon.email.verification.stub</artifactId>
 		<version>${carbon.version}</version>
             </dependency>
-	    <!--dependency>
+	    <dependency>
                 <groupId>org.apache.stratos</groupId>
                 <artifactId>org.apache.stratos.tenant.register.stub</artifactId>
                 <version>${project.version}</version>
-            </dependency-->
-	    <dependency>
-                <groupId>org.wso2.carbon</groupId>
-                <artifactId>org.wso2.carbon.tenant.register.stub</artifactId>
-                <version>${carbon.version}</version>
             </dependency>
 	    <dependency>
                 <groupId>org.wso2.carbon</groupId>
@@ -172,28 +167,27 @@
                             <bundles>
                                 <bundleDef>org.apache.stratos:org.apache.stratos.account.mgt.ui:${project.version}</bundleDef>
                                 <!--<bundleDef>org.wso2.carbon:org.wso2.carbon.tenant.mgt.ui</bundleDef>-->
-                                <bundleDef>org.apache.stratos:org.apache.stratos.theme.mgt.ui</bundleDef>
-                                <bundleDef>org.apache.stratos:org.apache.stratos.theme.mgt.stub</bundleDef>
+                                <bundleDef>org.apache.stratos:org.apache.stratos.theme.mgt.ui:${project.version}</bundleDef>
+                                <bundleDef>org.apache.stratos:org.apache.stratos.theme.mgt.stub:${project.version}</bundleDef>
                                 <bundleDef>org.apache.batik.wso2:batik</bundleDef>
-                                <bundleDef>org.apache.stratos:org.apache.stratos.validate.domain.ui</bundleDef>
-                                <bundleDef>org.wso2.carbon:org.wso2.carbon.register.ui:2.1.1</bundleDef>
+                                <bundleDef>org.apache.stratos:org.apache.stratos.validate.domain.ui:${project.version}</bundleDef>
+                                <bundleDef>org.apache.stratos:org.apache.stratos.register.ui:${project.version}</bundleDef>
 				<!--bundleDef>org.wso2.carbon:org.wso2.carbon.payment.ui:${stratos.component.version}</bundleDef-->
                                 <bundleDef>org.wso2.carbon:org.wso2.carbon.email.verification.ui</bundleDef>
                                 <bundleDef>org.wso2.carbon:org.wso2.carbon.email.verification.stub</bundleDef>
-                                <bundleDef>org.apache.stratos:org.apache.stratos.manager.dashboard.ui </bundleDef>
-				<bundleDef>org.apache.stratos:org.apache.stratos.manager.dashboard.stub</bundleDef>
-                                <bundleDef>org.apache.stratos:org.apache.stratos.manager.login.ui</bundleDef>
-                                <bundleDef>org.apache.stratos:org.apache.stratos.manager.styles</bundleDef>
+                                <bundleDef>org.apache.stratos:org.apache.stratos.manager.dashboard.ui:${project.version}</bundleDef>
+				<bundleDef>org.apache.stratos:org.apache.stratos.manager.dashboard.stub:${project.version}</bundleDef>
+                                <bundleDef>org.apache.stratos:org.apache.stratos.manager.login.ui:${project.version}</bundleDef>
+                                <bundleDef>org.apache.stratos:org.apache.stratos.manager.styles:${project.version}</bundleDef>
 				<!--<bundleDef>org.wso2.carbon:org.wso2.carbon.tenant.activity.ui</bundleDef>
 				<bundleDef>org.wso2.carbon:org.wso2.carbon.tenant.activity.stub:${wso2carbon.version}</bundleDef>-->
 
 				<!--stub bundles -->
 
 				<bundleDef>org.apache.stratos:org.apache.stratos.account.mgt.stub:${project.version}</bundleDef>
-				<bundleDef>org.apache.stratos:org.apache.stratos.validate.domain.stub</bundleDef>
+				<bundleDef>org.apache.stratos:org.apache.stratos.validate.domain.stub:${project.version}</bundleDef>
 				<!--<bundleDef>org.wso2.carbon:org.wso2.carbon.tenant.mgt.stub:${wso2carbon.version}</bundleDef>-->
-				<!--bundleDef>org.apache.stratos:org.apache.stratos.tenant.register.stub:${project.version}</bundleDef-->
-				<bundleDef>org.wso2.carbon:org.wso2.carbon.tenant.register.stub:${carbon.version}</bundleDef>
+				<bundleDef>org.apache.stratos:org.apache.stratos.tenant.register.stub:${project.version}</bundleDef>
 				<bundleDef>org.wso2.carbon:org.wso2.carbon.payment.stub:${wso2carbon.version}</bundleDef>
                             </bundles>
                             <importBundles>


[2/3] Renamed org.apache.stratos.tenant.registration.ui to org.apache.stratos.register.ui. Changed product to use org.apache.stratos.register.ui

Posted by is...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_domain.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_domain.jsp b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_domain.jsp
new file mode 100644
index 0000000..303a38e
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_domain.jsp
@@ -0,0 +1,390 @@
+<!-- 
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<%@ page import="org.apache.stratos.common.constants.StratosConstants" %>
+<%@ page import="org.apache.stratos.common.util.CommonUtil" %>
+<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
+<%@ page import="org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
+<script type="text/javascript" src="../registry_common/js/registry_validation.js"></script>
+<script type="text/javascript" src="../registry_common/js/registry_common.js"></script>
+<script type="text/javascript" src="../ajax/js/prototype.js"></script>
+<script type="text/javascript" src="js/select_domain.js"></script>
+<script type="text/javascript" src="../admin/js/jquery.js"></script>
+<script type="text/javascript" src="../admin/js/jquery.form.js"></script>
+<script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
+<script type="text/javascript" src="../googleanalytics/js/googleAnalyticsProcessor.js"></script>
+<carbon:jsi18n
+        resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
+        request="<%=request%>"/>
+<fmt:bundle basename="org.wso2.carbon.register.ui.i18n.Resources">
+
+<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
+<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
+<script type="text/javascript" src="js/register_config.js"></script>
+<script type="text/javascript">
+
+    var packageInfo;
+    
+    function setFreeUsagePlan() {
+        var foundFreePlan = false;
+        for (var i = 0; i < packageInfo.length; i++) {
+            if (packageInfo[i].subscriptionCharge == "0") {
+                document.getElementById("selectedUsagePlan").value = packageInfo[i].name;
+                foundFreePlan = true;
+                return;
+            }
+        }
+        if(!foundFreePlan) {
+            document.getElementById("selectedUsagePlan").value = packageInfo[0].name;
+        }
+    }
+
+    jQuery(document).ready(
+                          function() {
+                              jQuery.ajax({
+                                  type: 'POST',
+                                  url: 'get_package_info_ajaxprocessor.jsp',
+                                  dataType: 'json',
+                                  data: 'plan=0',
+                                  async: false,
+                                  success: function(data) {
+                                      packageInfo = data;
+                                  },
+                                  error:function (xhr, ajaxOptions, thrownError) {
+                                      CARBON.showErrorDialog('Could not get package information.');
+                                  }
+                              });
+
+                          }
+            );
+</script>
+
+
+<%
+    String domainName = "";
+    String admin = "";
+    String email = "";
+    String firstname = "";
+    String lastname = "";
+    String usagePlan = "";
+    String license = CommonUtil.getEula();
+    boolean isPublicCloud = CommonUtil.isPublicCloudSetup();
+
+    session.setAttribute(StratosConstants.ORIGINATED_SERVICE,
+            request.getParameter(StratosConstants.ORIGINATED_SERVICE));
+    String domain = (String) session.getAttribute("temp-domain-to-register");
+    if (domain == null) {
+        domain = "";
+    }
+    session.removeAttribute("temp-domain-to-register");
+    // hm, i'm not sure whether we really need to clear the success key, if someone in the same session
+    // have succeeded validating the domain, we should let them ignore the validation step. but if
+    // someone look at this without much investigation, he may think this is a bug, so thought of clearing
+    // it anyway...
+    session.removeAttribute("validate-domain-success-key");
+    if ("false".equals(session.getAttribute("temp-domain-available"))) {
+        session.removeAttribute("temp-domain-available");
+%>
+
+<script type="text/javascript">
+    jQuery(document).ready(function() {
+        CARBON.showWarningDialog(jsi18n["domain.unavailable"]);
+    });
+</script>
+<%
+    }
+%>
+<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
+
+<%
+    CaptchaInfoBean captchaInfoBean;
+    try {
+        captchaInfoBean = TenantConfigUtil.generateRandomCaptcha(config, session);
+    } catch (Exception e) {
+        return;
+    }
+    String captchaImagePath = captchaInfoBean.getImagePath();
+
+    String captchaImageUrl = "../../" + captchaImagePath;
+    String captchaSecretKey = captchaInfoBean.getSecretKey();
+
+    if (session.getAttribute("submit-domain") != null) {
+        domain = (String) session.getAttribute("submit-domain");
+        session.setAttribute("submit-domain", null);
+    }
+    if (session.getAttribute("submit-admin") != null) {
+        admin = (String) session.getAttribute("submit-admin");
+        session.setAttribute("submit-admin", null);
+    }
+    if (session.getAttribute("submit-admin-email") != null) {
+        email = (String) session.getAttribute("submit-admin-email");
+        session.setAttribute("submit-admin-email", null);
+    }
+    if (session.getAttribute("submit-admin-firstname") != null) {
+        firstname = (String) session.getAttribute("submit-admin-firstname");
+        session.setAttribute("submit-admin-firstname", null);
+    }
+    if (session.getAttribute("submit-admin-lastname") != null) {
+        lastname = (String) session.getAttribute("submit-admin-lastname");
+        session.setAttribute("submit-admin-lastname", null);
+    }
+%>
+
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+
+<%
+    if ("failed".equals(session.getAttribute("kaptcha-status"))) {
+        session.setAttribute("kaptcha-status", null);
+%>
+
+<script type="text/javascript">
+    jQuery(document).ready(function() {
+        CARBON.showWarningDialog('Please enter the letters shown as in the image to register.');
+    });
+</script>
+<%
+    }
+
+    if ("true".equals(session.getAttribute("add-tenant-failed"))) {
+        session.removeAttribute("add-tenant-failed");
+%>
+
+<script type="text/javascript">
+    jQuery(document).ready(function() {
+        CARBON.showWarningDialog('Organization registration failed. Please try again with a different domain.');
+    });
+</script>
+<%
+    }
+%>
+<script type="text/javascript">
+    jQuery(document).ready(function() {
+
+        jQuery(".toggle_container").show();
+        /*Hide (Collapse) the toggle containers on load use show() instead of hide() in the
+         above code if you want to keep the content section expanded. */
+
+        jQuery("h2.trigger").click(function() {
+            if (jQuery(this).next().is(":visible")) {
+                this.className = "active trigger";
+            } else {
+                this.className = "trigger";
+            }
+
+            jQuery(this).next().slideToggle("fast");
+            return false; //Prevent the browser jump to the link anchor
+        });
+    });
+</script>
+<div id="middle">
+
+    <h2><fmt:message key="register.new.organization"/></h2>
+
+    <div id="workArea">
+        <div class="registration_help"><fmt:message key="required.msg"/></div>
+        <div id="activityReason" style="display: none;"></div>
+        <form id="addTenantForm" action="submit_tenant_ajaxprocessor.jsp" method="post">
+
+            <table class="styledLeft">
+                <tbody>
+                <tr>
+                    <td class="nopadding">
+                        <h2 class="trigger"><a href="#"><fmt:message key="domain.information"/></a></h2>
+
+                        <div class="toggle_container">
+                            <table class="normal-nopadding" cellspacing="0">
+                                <tbody>
+                                <tr>
+                                    <td class="leftCol-med"><fmt:message key="domain"/><span class="required">*</span>
+                                    </td>
+                                    <td colspan="2"><input onblur="fillAdminValue()"
+                                                           value="<%=domain%>" type="text"
+                                                           name="domain" id="domain"
+                                                           style="width:400px" value=""/>
+                                        <input type="button" value="Check Availability"
+                                               onclick="checkDomainAvailability(<%=isPublicCloud?"true":"false"%>)"/> <span
+                                                id="busyCheck"></span>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td></td>
+                                    <td colspan="2">Provide a domain for your tenant, in the
+                                        format "example.com". This domain should be unique.
+                                        If this is a legitimate domain, optionally you will be able to validate the ownership of the domain.
+                                    </td>
+                                </tr>
+
+                                <tr>
+                                    <td></td>
+                                    <td colspan="2">
+                                        <div id="domain-confirmation-msg"></div>
+                                    </td>
+                                </tr>
+
+                                <tr>
+                                    <td></td>
+                                    <td colspan="2">
+                                        <input type="checkbox" name="domain-confirmation"
+                                               value="yes">Validate the domain now
+                                        (optional)</input>
+                                    </td>
+                                </tr>
+
+                                </tbody>
+                            </table>
+                        </div>
+
+                        <h2 class="trigger"><a href="#"><fmt:message key="contact.details"/></a></h2>
+
+                        <div class="toggle_container">
+                            <table class="normal-nopadding" cellspacing="0">
+                                <tbody>
+                                <tr>
+                                    <td class="leftCol-med"><fmt:message key="admin.firstname"/><span
+                                            class="required">*</span></td>
+                                    <td><input type="text" name="admin-firstname" id="admin-firstname"
+                                               style="width:400px" value="<%=firstname%>"/></td>
+                                </tr>
+                                <tr>
+                                    <td><fmt:message key="admin.lastname"/><span class="required">*</span></td>
+                                    <td><input type="text" name="admin-lastname" id="admin-lastname" style="width:400px"
+                                               value="<%=lastname%>"/></td>
+                                </tr>
+                                <tr>
+                                    <td><fmt:message key="admin.username"/><span class="required">*</span></td>
+                                    <td><input type="text" name="admin" id="admin" style="width:400px"
+                                               value="<%=admin%>"/><span id="adminValue"></span></td>
+                                </tr>
+                                <tr>
+                                    <td><fmt:message key="admin.password"/>
+                                        <span class="required">*</span></td>
+                                    <td><input type="password" name="admin-password" id="admin-password"
+                                               style="width:400px"/></td>
+                                </tr>
+                                <tr>
+                                    <td></td>
+                                    <td class="registration_help">(Minimum of 6 Characters in length)</td>
+                                </tr>
+                                <tr>
+                                    <td><fmt:message key="admin.password.repeat"/>
+                                        <span class="required">*</span></td>
+                                    <td><input type="password" name="admin-password-repeat" id="admin-password-repeat"
+                                               style="width:400px"/></td>
+                                </tr>
+                                <tr>
+                                    <td class="leftCol-med"><fmt:message key="admin.email"/><span
+                                            class="required">*</span></td>
+                                    <td colspan="2"><input type="text" name="admin-email" id="admin-email"
+                                                           style="width:400px" value="<%=email%>"/></td>
+                                </tr>
+                                <tr>
+                                    <td class="leftCol-med"><fmt:message key="word.verification"/><span
+                                            class="required">*</span></td>
+                                    <td colspan="2"><fmt:message key="captcha.message"/></td>
+                                </tr>
+                                <tr>
+                                    <td></td>
+                                    <td colspan="2">
+                                        <div id="kaptchaImgDiv"></div>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td></td>
+                                    <td colspan="2" height="100"><input type="text" id="captcha-user-answer"
+                                                                        name="captcha-user-answer" style="width:400px"
+                                                                        value=""/></td>
+                                </tr>
+                                </tbody>
+                            </table>
+                        </div>
+
+                        <%
+                            if (isPublicCloud) {
+                        %>
+                        <h2 class="trigger"><a href="#"><fmt:message key="terms.of.use"/></a></h2>
+
+                        <div class="toggle_container">
+                            <table class="normal-nopadding" cellspacing="0">
+                                <tbody>
+
+
+                                <tr></tr>
+                                <tr>
+                                    <td>
+                                        <textarea rows="10" readonly="readonly" name="license-text"
+                                                  style="width:100%"><%=license%>
+                                        </textarea>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td><input type="checkbox" name="activateButton" id="activateButton"
+                                               onclick="activateSubmit(form.activateButton.checked)"/>
+                                        <label for="activateButton"><fmt:message key="accept.eula"/></label></td>
+                                </tr>
+                                <%
+                                    }
+                                %>
+
+
+                                </tbody>
+                            </table>
+                        </div>
+                    </td>
+                </tr>
+                <tr id="buttonRow" colspan="2">
+                    <td class="buttonRow">
+                        <input type="hidden" name="selectedUsagePlan" id="selectedUsagePlan"/>
+                        <input type="hidden" name="captcha-secret-key" value="<%=captchaSecretKey%>"/>
+                        <%
+                            if (isPublicCloud) {
+                        %>
+                        <input class="button" id="submit-button" type="button" disabled="disabled" style="float:left; margin-top:4px"
+                               value="Next >" onclick="setFreeUsagePlan();addTenant();jQuery(this).attr('disabled', true);jQuery('#waitMessage').toggle('fast')"/>
+                        <%
+                        } else {
+                        %>
+                        <input class="button" id="submit-button" type="button" style="float:left; margin-top:4px"
+                               value="Next >" onclick="setFreeUsagePlan();addTenant();jQuery(this).attr('disabled', true);jQuery('#waitMessage').toggle('fast')"/>
+                        <%
+                            }
+                        %>
+                        <div id="waitMessage" style="font-size:13px !important;margin-top:5px; float:left;display:none"><img
+                                src="images/ajax-loader.gif" align="left" hspace="20"/>Registering new tenant ...
+                        </div>
+                        <div style="clear:both"></div>
+                    </td>
+                </tr>
+                </tbody>
+            </table>
+        </form>
+        <br/>
+    </div>
+</div>
+<script type="text/javascript">
+    showKaptcha('<%=captchaImageUrl%>');
+</script>
+</fmt:bundle>
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp
new file mode 100644
index 0000000..cf90ed4
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/select_usage_plan.jsp
@@ -0,0 +1,280 @@
+<!-- 
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<%@ page import="org.apache.stratos.common.constants.StratosConstants" %>
+<%@ page import="org.apache.stratos.common.util.CommonUtil" %>
+<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
+<%@ page import="org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
+<script type="text/javascript" src="../registry_common/js/registry_validation.js"></script>
+<script type="text/javascript" src="../registry_common/js/registry_common.js"></script>
+<script type="text/javascript" src="../ajax/js/prototype.js"></script>
+<script type="text/javascript" src="js/select_domain.js"></script>
+<script type="text/javascript" src="../admin/js/jquery.js"></script>
+<script type="text/javascript" src="../admin/js/jquery.form.js"></script>
+<script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
+<script type="text/javascript" src="../googleanalytics/js/googleAnalyticsProcessor.js"></script>
+<carbon:jsi18n
+        resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
+        request="<%=request%>"/>
+<fmt:bundle basename="org.wso2.carbon.register.ui.i18n.Resources">
+
+<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
+<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
+<script type="text/javascript" src="js/register_config.js"></script>
+<script type="text/javascript">
+
+<%
+    boolean chargeOnRegistration = CommonUtil.isChargedOnRegistration();
+    String regDomain = (String)session.getAttribute("regTenantDomain");
+%>
+    var packageInfo;
+    function showRentalMessage() {
+
+        if (packageInfo == null) {
+            jQuery.ajax({
+                type: 'POST',
+                url: 'get_package_info_ajaxprocessor.jsp',
+                dataType: 'json',
+                data: 'plan=0',
+                async: false,
+                success: function(data) {
+                    packageInfo = data;
+                },
+                error:function (xhr, ajaxOptions, thrownError) {
+                    CARBON.showErrorDialog('Could not get package information.');
+                }
+            });
+        }
+
+        var plan = document.getElementById('selectedUsagePlan').
+                options[document.getElementById('selectedUsagePlan').selectedIndex].value;
+        var charge;
+        for (var i = 0; i < packageInfo.length; i++) {
+            if (packageInfo[i].name == plan) {
+                charge = packageInfo[i].subscriptionCharge;
+                break;
+            }
+
+        }
+
+        document.getElementById('packagePrice').innerHTML = '<b>' + '<fmt:message key="billing.currency"/>' + charge + " per month" + '</b>';
+
+    }
+
+    function makePayment() {
+        var selectEl = document.getElementById("selectedUsagePlan");
+        var selectedUsagePlan = selectEl.options[selectEl.selectedIndex].value;
+        var regTenantDomain = '<%= regDomain%>';
+
+
+        for (var i = 0; i < packageInfo.length; i++) {
+        <% if (chargeOnRegistration) { %>
+            if (packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge != "0") {
+                CARBON.showConfirmationDialog('<fmt:message key="redirect.to.paypal.msg1"/>' + " " + '<fmt:message key="billing.currency"/>' + packageInfo[i].subscriptionCharge +
+                                              ". " + '<fmt:message key="redirect.to.paypal.msg2"/>', function() {
+                    document.getElementById('waitMessage').style.display = 'block';
+                    document.forms["selectUsagePlan"].submit();
+                }, function () {
+                    document.getElementById('submit-button').removeAttribute('disabled');
+                })
+
+            } else if (packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge == "0") {
+                location.href = "../tenant-register/success_register.jsp";
+                break;
+            }
+            <% } else { %>
+                if(packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge != "0") {
+                    jQuery.ajax({
+                        type: 'POST',
+                        url: '../payment/upgrade_registration_usage_plan_ajaxprocessor.jsp',
+                        data: {selectedUsagePlan: selectedUsagePlan, regTenantDomain: regTenantDomain},
+                        async: false,
+                        success: function(msg) {
+                    }});
+                    location.href = "../tenant-register/success_register.jsp";
+                    break;
+                } else if (packageInfo[i].name == selectedUsagePlan && packageInfo[i].subscriptionCharge == "0") {
+                    location.href = "../tenant-register/success_register.jsp";
+                    break;
+                }
+        <% } %>
+
+        }
+    }
+
+    function cancelPaymet() {
+        location.href = "../tenant-register/success_register.jsp";
+    }
+
+    jQuery(document).ready(
+                          function() {
+                              jQuery.ajax({
+                                  type: 'POST',
+                                  url: 'get_package_info_ajaxprocessor.jsp',
+                                  dataType: 'json',
+                                  data: 'plan=0',
+                                  async: false,
+                                  success: function(data) {
+                                      packageInfo = data;
+                                  },
+                                  error:function (xhr, ajaxOptions, thrownError) {
+                                      CARBON.showErrorDialog('Could not get package information.');
+                                  }
+                              });
+
+                              var charge;
+                              var name;
+                              for (var i = 0; i < packageInfo.length; i++) {
+                                  charge = packageInfo[i].subscriptionCharge;
+                                  name = packageInfo[i].name;
+                                  option = document.createElement("option");
+                                  option.value = name;
+                                  option.innerHTML = name;
+                                  document.getElementById('selectedUsagePlan').appendChild(option);
+
+                              }
+                          }
+            );
+</script>
+
+
+<%
+    boolean isPublicCloud = CommonUtil.isPublicCloudSetup();
+
+    session.setAttribute(StratosConstants.ORIGINATED_SERVICE,
+            request.getParameter(StratosConstants.ORIGINATED_SERVICE));
+    String domain = (String) session.getAttribute("temp-domain-to-register");
+    if (domain == null) {
+        domain = "";
+    }
+    session.removeAttribute("temp-domain-to-register");
+    // hm, i'm not sure whether we really need to clear the success key, if someone in the same session
+    // have succeeded validating the domain, we should let them ignore the validation step. but if
+    // someone look at this without much investigation, he may think this is a bug, so thought of clearing
+    // it anyway...
+    session.removeAttribute("validate-domain-success-key");
+    if ("false".equals(session.getAttribute("temp-domain-available"))) {
+        session.removeAttribute("temp-domain-available");
+%>
+
+<script type="text/javascript">
+    jQuery(document).ready(function() {
+        CARBON.showWarningDialog(jsi18n["domain.unavailable"]);
+    });
+</script>
+<%
+    }
+%>
+<link href="../tenant-register/css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+
+<script type="text/javascript">
+    jQuery(document).ready(function() {
+
+        jQuery(".toggle_container").show();
+        /*Hide (Collapse) the toggle containers on load use show() instead of hide() in the
+         above code if you want to keep the content section expanded. */
+
+        jQuery("h2.trigger").click(function() {
+            if (jQuery(this).next().is(":visible")) {
+                this.className = "active trigger";
+            } else {
+                this.className = "trigger";
+            }
+
+            jQuery(this).next().slideToggle("fast");
+            return false; //Prevent the browser jump to the link anchor
+        });
+    });
+
+</script>
+<div id="middle">
+
+    <h2><fmt:message key="register.new.organization"/></h2>
+
+    <div id="workArea">
+        <div class="registration_help"><fmt:message key="required.msg"/></div>
+        <div id="activityReason" style="display: none;"></div>
+        <form id="selectUsagePlan" action="init_payment_ajaxprocessor.jsp" method="post">
+
+            <table class="styledLeft">
+                <tbody>
+                <tr>
+                    <td class="nopadding">
+                        <h2 class="trigger"><a href="#"><fmt:message key="usage.plan.information"/></a></h2>
+
+                        <div class="toggle_container">
+                            <table class="normal-nopadding" cellspacing="0">
+                                <tbody>
+                                <tr>
+                                    <td class="leftCol-med">
+                                        <fmt:message key="select.usage.plan.for.tenant"/><span class="required">*</span>
+                                    </td>
+                                    <td colspan="2">
+                                        <select name="selectedUsagePlan" id="selectedUsagePlan"
+                                                onchange="showRentalMessage();">
+                                        </select>
+                                        <a href="<%=CommonUtil.getStratosConfig().getUsagePlanURL()%>" target="_blank">
+                                            <b>Pricing Info</b>
+                                        </a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td></td>
+                                    <td colspan="2" id="packagePrice" class="registration_help"><b><fmt:message
+                                            key="demo.package.price"/></b></td>
+                                </tr>
+                                <tr>
+                                    <td></td>
+                                    <td colspan="2" class="registration_help"><fmt:message
+                                            key="select.package.message"/>
+                                    </td>
+                                </tr>
+                                </tbody>
+                            </table>
+                        </div>                        
+                    </td>
+                </tr>
+                <tr id="buttonRow">
+                    <td class="buttonRow">
+                        <input class="button" id="submit-button" type="button" style="float:left; margin-top:4px; margin-right:4px;"
+                               value="Submit" onclick="makePayment();jQuery(this).attr('disabled', true)"/>
+                        <input class="button" id="cancel-button" type="button" style="float:left; margin-top:4px"
+                               value="Cancel" onclick="cancelPaymet()"/>
+                        <div id="waitMessage" style="font-size:13px !important;margin-top:5px; float:left; display:none"><img
+                                src="images/ajax-loader.gif" align="left" hspace="20"/>Connecting to PayPal ...
+                        </div>
+                        <div style="clear:both"></div>
+                    </td>
+                </tr>
+                </tbody>
+            </table>
+        </form>
+        <br/>
+    </div>
+</div>
+</fmt:bundle>
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
new file mode 100644
index 0000000..754e5bf
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
@@ -0,0 +1,67 @@
+<!-- 
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
+<%@ page import="org.apache.stratos.common.constants.StratosConstants"%>
+<%@ page import="org.wso2.carbon.captcha.mgt.constants.CaptchaMgtConstants"%>
+<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<carbon:jsi18n
+		resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
+		request="<%=request%>" />
+<%
+
+    try {
+        String gotoConfirmDomain = request.getParameter("domain-confirmation");
+        String domain = request.getParameter("domain");
+
+        String key = TenantConfigUtil.registerTenantConfigBean(request, config, session);
+
+        session.removeAttribute(StratosConstants.ORIGINATED_SERVICE);
+        session.setAttribute("add-tenant-success", "true");
+        session.setAttribute("regTenantDomain", domain);
+
+        String contextPath = "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/" + request.getParameter("domain");
+        //response.sendRedirect(contextPath + "/carbon/tenant-theme/theme_mgt.jsp?redirectWith=" + key);
+        // now we send the login page.
+
+       // response.sendRedirect(contextPath + "/carbon/admin/login.jsp");
+
+        if (gotoConfirmDomain != null && gotoConfirmDomain.equals("yes")) {
+            // send me to the domain validation form
+            response.sendRedirect("../validate-domain/validate_domain_not_logged_in.jsp?domain=" + domain);
+        }
+        else {
+            // send me direct to the add tenant form, without successkey they will add the suffix -unverified
+            response.sendRedirect("../tenant-register/select_usage_plan.jsp");
+        }
+
+    } catch (Exception e) {
+        String msg = e.getMessage();
+        TenantConfigUtil.setSubmissionValuesForSession(request);
+        if (msg.contains(CaptchaMgtConstants.CAPTCHA_ERROR_MSG)) {
+            session.setAttribute("kaptcha-status", "failed");
+        } else {
+        session.setAttribute("add-tenant-failed", "true");
+        }
+        response.sendRedirect("../tenant-register/select_domain.jsp");
+        return;
+    }
+%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/success_register.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/success_register.jsp b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/success_register.jsp
new file mode 100644
index 0000000..15c4d8b
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/success_register.jsp
@@ -0,0 +1,77 @@
+<!-- 
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<link href="css/tenant-register.css" rel="stylesheet" type="text/css" media="all"/>
+
+<%
+    // String contextPath = "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/" + request.getParameter("domain");
+%>
+<div id="middle">
+
+    <h2>
+        Account Created Successfully
+    </h2>
+
+    <div id="workArea">
+
+       <h3>Congratulations! You have successfully created an account for your organization with WSO2 Stratos. </h3>
+
+        <p style="font-size:16px" align="left">
+        A confirmation email has been sent to your email address for this account. Please follow the instructions in the email to activate the account.
+        After that login from the <a href="/carbon/admin/login.jsp"> <b>login page</b></a>.
+        </p>
+    </div>
+
+
+    <div class="clear"></div>
+    <div class="features">
+        <div class="feature">
+            <img src="images/feature-01-icon.gif"/>
+
+            <h2>Elasticity</h2>
+
+            <p>
+                Stratos manages your underlying cloud infrastructure to seamlessly handle the scalability demands of
+                your application.
+            </p>
+        </div>
+        <div class="feature">
+            <img src="images/feature-02-icon.gif"/>
+
+            <h2>Multi-tenancy</h2>
+
+            <p>
+                Departments, developer groups, or projects run fully independently, but share the same middleware
+                platform for maximum resource utilization.
+            </p>
+        </div>
+        <div class="feature">
+            <img src="images/feature-03-icon.gif"/>
+
+            <h2>Self Provisioning</h2>
+
+            <p>
+                Authorized users can provision new tenants from a web portal in moments.
+            </p>
+        </div>
+        <div class="clear"></div>
+    </div>
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/pom.xml b/components/org.apache.stratos.tenant.registration.ui/pom.xml
deleted file mode 100644
index 7d49650..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/pom.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 
-  #  Licensed to the Apache Software Foundation (ASF) under one
-  #  or more contributor license agreements.  See the NOTICE file
-  #  distributed with this work for additional information
-  #  regarding copyright ownership.  The ASF licenses this file
-  #  to you under the Apache License, Version 2.0 (the
-  #  "License"); you may not use this file except in compliance
-  #  with the License.  You may obtain a copy of the License at
-  #  
-  #  http://www.apache.org/licenses/LICENSE-2.0
-  #  
-  #  Unless required by applicable law or agreed to in writing,
-  #  software distributed under the License is distributed on an
-  #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  #  KIND, either express or implied.  See the License for the
-  #  specific language governing permissions and limitations
-  #  under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>org.apache.stratos</groupId>
-        <artifactId>stratos-components-parent</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>org.apache.stratos.register.ui</artifactId>
-    <packaging>bundle</packaging>
-    <name>Apache Stratos - Self Registration For New Tenant - User Interface</name>
-
-    <build>
-	<plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Name>${project.artifactId}</Bundle-Name>
-                        <Export-Package>
-                            org.wso2.carbon.register.ui.*,
-                        </Export-Package>
-                        <Import-Package>
-                            org.apache.stratos.tenant.register.stub.*; version=3.0.0-SHAPSHOT,
-                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
-                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
-                            !javax.xml.namespace,
-                            javax.xml.namespace; version=0.0.0,                            
-                            org.apache.lucene.*,
-                            org.wso2.carbon.captcha.mgt.*,
-                            *;resolution:=optional
-                        </Import-Package>
-                        <Carbon-Component>UIBundle</Carbon-Component>
-                    </instructions>
-                </configuration>
-            </plugin>
-
-        </plugins>
-    </build>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.registry.common.ui</artifactId>
-	    <version>4.1.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.registry.core</artifactId>
-            <version>4.1.0</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-	    <version>1.1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.equinox</groupId>
-            <artifactId>javax.servlet</artifactId>
-	    <version>3.0.0.v201112011016</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2.wso2</groupId>
-            <artifactId>axis2</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom.wso2</groupId>
-            <artifactId>axiom</artifactId>
-	    <version>1.2.11.wso2v2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.ui</artifactId>
-	    <version>4.1.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.tenant.register.stub</artifactId>
-	    <version>${project.version}</version>
-        </dependency>
-         <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.common.stub</artifactId>
-	    <version>${project.version}</version>
-        </dependency>
-        <dependency>
-          <groupId>org.json.wso2</groupId>
-          <artifactId>json</artifactId>
-	  <version>1.0.0.wso2v1</version>
-        </dependency>
-        <dependency>
-           <groupId>org.wso2.carbon</groupId>
-           <artifactId>org.wso2.carbon.captcha.mgt</artifactId>
-            <version>${wso2carbon.version}</version>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp b/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp
deleted file mode 100644
index 979870e..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java b/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
deleted file mode 100644
index 2979988..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.apache.stratos.register.ui.clients;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.json.JSONArray;
-import org.json.JSONObject;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.apache.stratos.common.packages.stub.PackageInfoServiceStub;
-import org.apache.stratos.common.packages.stub.PackageInfo;
-
-/**
- * PackageInfoService client
- */
-public class PackageInfoServiceClient {
-
-    private static Log log = LogFactory.getLog(PackageInfoServiceClient.class);
-
-    private PackageInfoServiceStub stub;
-    private String epr;
-
-    public PackageInfoServiceClient(
-            String cookie, String backendServerURL, ConfigurationContext configContext)
-            throws Exception {
-
-        epr = backendServerURL + "PackageInfoService";
-
-        try {
-            stub = new PackageInfoServiceStub(configContext, epr);
-
-            ServiceClient client = stub._getServiceClient();
-            Options option = client.getOptions();
-            option.setManageSession(true);
-            option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
-        } catch (AxisFault axisFault) {
-            String msg = "Failed to initiate PackageInfoService client. " + axisFault.getMessage();
-            log.error(msg, axisFault);
-            throw new RegistryException(msg, axisFault);
-        }
-    }
-
-    public PackageInfo[] getBillingPackages() throws Exception {
-
-        try {
-            return stub.getPackageInfos();
-        } catch (Exception e) {
-            String msg = "Failed to get package information: " + e.getMessage();
-            log.error(msg, e);
-            throw new Exception(msg, e);
-        }
-    }
-
-    public JSONArray getBillingPackagesJsonArray() throws Exception {
-
-        try {
-            PackageInfo[] packageInfoArray = stub.getPackageInfos();
-            JSONArray jsonPackageInfoArray = new JSONArray();
-            for (PackageInfo packageInfo : packageInfoArray) {
-                JSONObject packageInfoObj = new JSONObject();
-                packageInfoObj.put("name", packageInfo.getName());
-                //TODO https://wso2.org/jira/browse/STRATOS-1819
-                packageInfoObj.put("subscriptionCharge", packageInfo.getSubscriptionCharge());
-                jsonPackageInfoArray.put(packageInfoObj);
-            }
-            return jsonPackageInfoArray;
-        } catch (Exception e) {
-            String msg = "Failed to get package information: " + e.getMessage();
-            log.error(msg, e);
-            throw new Exception(msg, e);
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java b/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java
deleted file mode 100644
index f7beef6..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.register.ui.clients;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.CarbonConstants;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.apache.stratos.tenant.register.stub.TenantMgtServiceStub;
-import org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean;
-import org.apache.stratos.tenant.register.stub.beans.xsd.TenantInfoBean;
-import org.wso2.carbon.ui.CarbonUIUtil;
-import org.wso2.carbon.utils.ServerConstants;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.http.HttpSession;
-
-/**
- * Tenant Self Registration Client class
- */
-public class TenantSelfRegistrationClient {
-     private static final Log log = LogFactory.getLog(TenantSelfRegistrationClient.class);
-
-    private TenantMgtServiceStub stub;
-    private String epr;
-
-    public TenantSelfRegistrationClient(
-            String cookie, String backendServerURL, ConfigurationContext configContext)
-            throws RegistryException {
-
-        epr = backendServerURL + "TenantMgtService";
-
-        try {
-            stub = new TenantMgtServiceStub(configContext, epr);
-
-            ServiceClient client = stub._getServiceClient();
-            Options option = client.getOptions();
-            option.setManageSession(true);
-            option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
-        } catch (AxisFault axisFault) {
-            String msg = "Failed to initiate AddServices service client. " + axisFault.getMessage();
-            log.error(msg, axisFault);
-            throw new RegistryException(msg, axisFault);
-        }
-    }
-
-    public TenantSelfRegistrationClient(ServletConfig config, HttpSession session)
-            throws RegistryException {
-
-        String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
-        String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
-        ConfigurationContext configContext = (ConfigurationContext) config.
-                getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-        epr = backendServerURL + "TenantMgtService";
-
-        try {
-            stub = new TenantMgtServiceStub(configContext, epr);
-
-            ServiceClient client = stub._getServiceClient();
-            Options option = client.getOptions();
-            option.setManageSession(true);
-            option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
-        } catch (AxisFault axisFault) {
-            String msg = "Failed to initiate Add Services service client. " + axisFault.getMessage();
-            log.error(msg, axisFault);
-            throw new RegistryException(msg, axisFault);
-        }
-    }
-
-    public String registerTenant(TenantInfoBean tenantInfoBean,
-                                 CaptchaInfoBean captchaInfoBean) throws Exception {
-        return stub.registerTenant(tenantInfoBean, captchaInfoBean);
-     }
-
-    public boolean checkDomainAvailability(String domainName) throws Exception {
-        return stub.checkDomainAvailability(domainName);
-    }
-
-    public String validateOrSuggestDomain(String domainName, String successKey) throws Exception {
-        return stub.validateOrSuggestDomain(domainName, successKey);
-    }
-
-    public CaptchaInfoBean generateRandomCaptcha() throws Exception {
-        return stub.generateRandomCaptcha();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java b/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java
deleted file mode 100644
index 14d9104..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.register.ui.utils;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.util.Base64;
-import org.apache.axis2.AxisFault;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.register.ui.clients.TenantSelfRegistrationClient;
-import org.wso2.carbon.registry.common.ui.UIException;
-import org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean;
-import org.apache.stratos.tenant.register.stub.beans.xsd.TenantInfoBean;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
-import java.io.StringReader;
-import java.util.Calendar;
-import java.util.Iterator;
-
-/**
- * Utility methods for tenant configuration
- */
-public class TenantConfigUtil {
-    private static final Log log = LogFactory.getLog(TenantConfigUtil.class);
-
-    /**
-     * Registers the tenant
-     *
-     * @param request HttpServletRequest
-     * @param config  ServletConfig
-     * @param session HttpSession
-     * @return String
-     * @throws UIException
-     */
-    public static String registerTenantConfigBean(HttpServletRequest request,
-                                                  ServletConfig config, HttpSession session) throws UIException {
-        TenantInfoBean tenantInfoBean = new TenantInfoBean();
-        CaptchaInfoBean captchaInfoBean = new CaptchaInfoBean();
-
-        try {
-            // filling tenant info.
-            tenantInfoBean.setFirstname(request.getParameter("admin-firstname"));
-            tenantInfoBean.setLastname(request.getParameter("admin-lastname"));
-            tenantInfoBean.setAdmin(request.getParameter("admin"));
-            tenantInfoBean.setAdminPassword(request.getParameter("admin-password"));
-            tenantInfoBean.setTenantDomain(resolveDomainName(request.getParameter("domain")));
-            tenantInfoBean.setEmail(request.getParameter("admin-email"));
-            tenantInfoBean.setSuccessKey((String) session.getAttribute("validate-domain-success-key"));
-            tenantInfoBean.setUsagePlan(request.getParameter("selectedUsagePlan"));
-            tenantInfoBean.setOriginatedService(TenantConfigUtil.base64Decode((String) session.getAttribute(
-                    StratosConstants.ORIGINATED_SERVICE)));
-            tenantInfoBean.setCreatedDate(Calendar.getInstance());
-            // filling captcha info
-            captchaInfoBean.setSecretKey(request.getParameter("captcha-secret-key"));
-            captchaInfoBean.setUserAnswer(request.getParameter("captcha-user-answer"));
-
-            TenantSelfRegistrationClient selfRegistrationClient =
-                    new TenantSelfRegistrationClient(config, session);
-
-            String returnText = selfRegistrationClient.registerTenant(tenantInfoBean, captchaInfoBean);
-
-            return returnText;
-
-        } catch (Exception e) {
-            AxisFault fault = new AxisFault(e.getMessage());
-            String msg = fault.getReason() + " Failed to add tenant config. tenant-domain: " +
-                    tenantInfoBean.getTenantDomain() + ", " +
-                    "tenant-admin: " + tenantInfoBean.getAdmin() + ".";
-            log.error(msg, e);
-            // we are preserving the original message.
-            throw new UIException(e.getMessage(), e);
-        }
-    }
-
-
-    // do this before the send redirect.
-
-    public static void setSubmissionValuesForSession(HttpServletRequest request) {
-        HttpSession session = request.getSession();
-
-        session.setAttribute("submit-domain", resolveDomainName(request.getParameter("domain")));
-        session.setAttribute("submit-admin", request.getParameter("admin"));
-        session.setAttribute("submit-admin-firstname", request.getParameter("admin-firstname"));
-        session.setAttribute("submit-admin-lastname", request.getParameter("admin-lastname"));
-        session.setAttribute("submit-admin-email", request.getParameter("admin-email"));
-    }
-
-
-    /**
-     * Checks the availability of the domain
-     *
-     * @param request HttpServletRequest
-     * @param config  ServletConfig
-     * @param session HttpSession
-     * @return true, if domain is available to register
-     * @throws UIException if failed to check the availability.
-     */
-    public static boolean checkDomainAvailability(
-            HttpServletRequest request, ServletConfig config, HttpSession session)
-            throws UIException {
-        String tenantDomain = null;
-        try {
-            tenantDomain = resolveDomainName(request.getParameter("domain"));
-            TenantSelfRegistrationClient selfRegistrationClient =
-                    new TenantSelfRegistrationClient(config, session);
-            return selfRegistrationClient.checkDomainAvailability(tenantDomain);
-        } catch (Exception e) {
-            String msg = "Failed to check the domain availability:" + tenantDomain + ".";
-            log.error(msg, e);
-            throw new UIException(msg, e);
-        }
-    }
-
-    /**
-     * Validates or suggests the domain
-     *
-     * @param config  ServletConfig
-     * @param session HttpSession
-     * @return domain
-     * @throws UIException, if validating or suggesting the domain failed.
-     */
-    public static String validateOrSuggestDomain(ServletConfig config,
-                                                 HttpSession session) throws UIException {
-        String tempDomainToRegister = resolveDomainName(
-                (String) session.getAttribute("temp-domain-to-register"));
-        // here successKey can be null, in such cases services will directly go to suggest a name
-        String successKey = (String) session.getAttribute("validate-domain-success-key");
-
-        try {
-            TenantSelfRegistrationClient selfRegistrationClient =
-                    new TenantSelfRegistrationClient(config, session);
-            return selfRegistrationClient.validateOrSuggestDomain(tempDomainToRegister, successKey);
-        } catch (Exception e) {
-            String msg = "Failed to validate or suggest a domain related to :" +
-                    tempDomainToRegister + ".";
-            log.error(msg, e);
-            throw new UIException(msg, e);
-        }
-    }
-
-    /**
-     * Generates a random captcha
-     *
-     * @param config  ServletConfig
-     * @param session HttpSession
-     * @return CaptchaInfoBean
-     * @throws UIException, if generating the random captcha fails.
-     */
-    public static CaptchaInfoBean generateRandomCaptcha(ServletConfig config,
-                                                        HttpSession session) throws UIException {
-        try {
-            TenantSelfRegistrationClient selfRegistrationClient =
-                    new TenantSelfRegistrationClient(config, session);
-            return selfRegistrationClient.generateRandomCaptcha();
-        } catch (Exception e) {
-            String msg = "Error in generating the captcha image.";
-            log.error(msg, e);
-            throw new UIException(msg, e);
-        }
-    }
-
-    public static HttpServletRequest readIntermediateData(HttpServletRequest request, String data) {
-        try {
-            XMLStreamReader parser =
-                    XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(data));
-            StAXOMBuilder builder = new StAXOMBuilder(parser);
-            OMElement documentElement = builder.getDocumentElement();
-            Iterator it = documentElement.getChildElements();
-            while (it.hasNext()) {
-                OMElement element = (OMElement) it.next();
-                if ("admin".equals(element.getLocalName())) {
-                    request.setAttribute("admin", element.getText());
-                } else if ("firstname".equals(element.getText())) {
-                    request.setAttribute("firstname", element.getText());
-                } else if ("lastname".equals(element.getText())) {
-                    request.setAttribute("lastname", element.getText());
-                } else if ("email".equals(element.getLocalName())) {
-                    request.setAttribute("email", element.getText());
-                } else if ("tenantDomain".equals(element.getLocalName())) {
-                    request.setAttribute("tenantDomain", element.getText());
-                } else if ("confirmationKey".equals(element.getLocalName())) {
-                    request.setAttribute("confirmationKey", element.getText());
-                }
-            }
-        } catch (Exception e) {
-            log.error("Error parsing xml", e);
-        }
-        return request;
-    }
-
-    /**
-     * Resolves the correct domain name in the form of example.com from the user input domain name.
-     * Currently strips out "www."and white space. Can add more checks.
-     *
-     * @param domainNameUserInput the user input domain name
-     * @return the domain after removing (if entered) www. from the input.
-     */
-    public static String resolveDomainName(String domainNameUserInput) {
-        if (domainNameUserInput == null) {
-            String msg = "Provided domain name is null";
-            log.error(msg);
-            return "";
-        }
-        String domainName = domainNameUserInput.trim();
-        if (domainName.startsWith("www.")) {
-            domainName = domainName.substring(4);
-        }
-        return domainName;
-    }
-
-    /**
-     * A basic method to decode the encoded Stratos Service Name
-     *
-     * @param encodedStr Encoded Stratos Service Name
-     * @return Decoded Stratos Service name
-     */
-    private static String base64Decode(String encodedStr) {
-        String decodedStr = null;
-        // Check whether this value is null(not set) or set to "null" which is also possible.
-        if (encodedStr != null && !"null".equals(encodedStr)) {
-            decodedStr = new String(Base64.decode(encodedStr));
-        }
-        return decodedStr;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/META-INF/component.xml b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/META-INF/component.xml
deleted file mode 100644
index c9b752a..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/META-INF/component.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<!-- 
-  #  Licensed to the Apache Software Foundation (ASF) under one
-  #  or more contributor license agreements.  See the NOTICE file
-  #  distributed with this work for additional information
-  #  regarding copyright ownership.  The ASF licenses this file
-  #  to you under the Apache License, Version 2.0 (the
-  #  "License"); you may not use this file except in compliance
-  #  with the License.  You may obtain a copy of the License at
-  #  
-  #  http://www.apache.org/licenses/LICENSE-2.0
-  #  
-  #  Unless required by applicable law or agreed to in writing,
-  #  software distributed under the License is distributed on an
-  #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  #  KIND, either express or implied.  See the License for the
-  #  specific language governing permissions and limitations
-  #  under the License.
-  -->
-<component xmlns="http://products.wso2.org/carbon">
-    <!-- sample menu configuration -->
-    <menus>
-        <menu>
-            <id>gaas_menu</id>
-            <i18n-key>gaas</i18n-key>
-            <i18n-bundle>org.wso2.carbon.register.ui.i18n.Resources</i18n-bundle>
-            <parent-menu></parent-menu>
-            <link>#</link>
-            <skip-authentication/>
-            <region>region1</region>
-            <order>2</order>
-            <style-class>home</style-class>
-        </menu>
-        <menu>
-            <id>gaas_register_org_menu</id>
-            <i18n-key>register.org.menu</i18n-key>
-            <i18n-bundle>org.wso2.carbon.register.ui.i18n.Resources</i18n-bundle>
-            <parent-menu>gaas_menu</parent-menu>
-            <link>../tenant-register/select_domain.jsp</link>
-            <region>region1</region>
-            <order>1</order>
-            <style-class>manage</style-class>
-            <icon>../tenant-register/images/signup-new-org.gif</icon>
-            <skip-authentication>
-                <skip-link>../tenant-register/self_registration_complete.jsp</skip-link>
-                <skip-link>../tenant-register/domain_availability_ajaxprocessor.jsp</skip-link>
-                <skip-link>../tenant-register/select_domain.jsp</skip-link>
-                <skip-link>../tenant-register/select_usage_plan.jsp</skip-link>
-                <skip-link>../tenant-register/success_register.jsp</skip-link>
-
-                <!-- the following files need to be placed in the validate-domain ui component,
-                 but since it has no menu, it had to be moved here -->
-                <skip-link>../validate-domain/validate_domain_not_logged_in.jsp</skip-link>
-                <skip-link>../validate-domain/validate_with_dns_ajaxprocessor.jsp</skip-link>
-                <skip-link>../validate-domain/validate_with_text_ajaxprocessor.jsp</skip-link>
-                <skip-link>../validate-domain/submit_validate_domain_ajaxprocessor.jsp</skip-link>
-
-                <!-- account-mgt stuff -->
-                <skip-link>../account-mgt/update_verifier.jsp</skip-link>
-                <skip-link>../email-verification/validator_ajaxprocessor.jsp</skip-link>
-                <skip-link>../email-verification/invalid_email.jsp</skip-link>
-                <skip-link>../account-mgt/update_verifier_redirector_ajaxprocessor.jsp</skip-link>
-
-                <!--payment stuff -->
-                <skip-link>../payment/registration_payment.jsp</skip-link>
-                <skip-link>../payment/registration_payment_completed.jsp</skip-link>
-            </skip-authentication>
-            <require-not-logged-in>true</require-not-logged-in>
-        </menu>
-    </menus>
-
-</component>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties
deleted file mode 100644
index c49c4b0..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-password.mismatched=Passwords do not match.
-email.mismatched=The emails are mismatching.
-current.password.should.provided=You should provide the current password in order to change the password.
-password.length=Your password must be at least 6 characters long. Try again.
-domain.available=Domain is available to register.
-domain.unavailable=Sorry!. The Domain is already registered. Please choose a different domain.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties
deleted file mode 100644
index b757c4f..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-submit.tenant=Submit Tenant
-domain=Tenant Domain
-domain.information=Domain Information
-terms.of.use=Terms of Use
-contact.details=Contact Details
-admin.username=Admin Username
-username=Username
-username.or.domain=Username/Domain
-current.admin.password=Current Admin Password
-new.admin.password=New Admin Password
-new.admin.password.repeat=New Admin Password (Repeat)
-admin.password=Admin Password
-admin.password.repeat=Admin Password (Repeat)
-govern.add_tenants.menu=Add New Tenant
-govern.view_tenants.menu=View Tenants
-overview=Overview
-tenants.list=Tenants List
-company.organization=Company/Organization
-admin.contact=Admin Contact
-edit=Edit
-multitenancy=Multitenancy
-added.successfully=You have successfully added a new tenant with domain:
-updated.successfully=You have successfully updated the tenant with domain:
-update.added.tenant=Update the just added/updated tenant
-update.tenant=Update Tenant
-add.new.tenant=Add a new tenant
-register.new.organization=Sign up your organization
-view.all.tenants=View all tenants
-tenant.admin=Tenant Admin
-tenant.description=Tenant Description
-admin.fullname=Full Name
-admin.firstname=First Name
-admin.lastname=Last Name
-admin.address=Address
-admin.email=Email
-admin.email.repeat=Email (Repeat)
-admin.telephone=Telephone
-admin.im=IM
-admin.url=URL
-self.registration=Registry Tenant
-gaas=Sign up
-register.org.menu=Sign up new organization
-gaas.register.a.new.tenant=Register A New Tenant
-active=Active
-theme.management=Theme Management
-word.verification=Word Verification
-captcha.message=Type the characters you see in the picture below.
-select.domain.menu=Sign up new organization
-select.domain.title=Select a domain for your organization
-password.reset=Password Reset
-password.reset.failed=Password Reset Attempt Failed
-verified.request.successfully=You have successfully verified your Password reset request.\nPls reset your password below.
-request.verification.failed=Password Reset Verification Failed. \nPls make sure you have clicked the correct link to reset your domain's admin password.
-accept.eula=I have read and accepted the terms in the license agreement above.
-usage.plan.information= Usage Plan Information
-select.usage.plan.for.tenant=Select Usage Plan For Tenant
-demo.package.price=$0 per month
-select.package.message=According to the selected plan, resources will be allocated for you. You can upgrade or downgrade your plan later according to your requirements. If you need more information on plans, click 'Pricing Info'.
-required.msg=All fields marked with an asterisk (<span class="required">*</span>) are required. 
-billing.currency=$
-redirect.to.paypal.msg1=You will be redirected to PayPal to make a registration payment of
-redirect.to.paypal.msg2=Do you wish to proceed?  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/css/tenant-register.css
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/css/tenant-register.css b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/css/tenant-register.css
deleted file mode 100644
index 621c028..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/css/tenant-register.css
+++ /dev/null
@@ -1,78 +0,0 @@
-body {
-	color:#111111;
-	font-size:0.75em;
-	font-size-adjust:none;
-	font-style:normal;
-	font-variant:normal;
-	font-weight:normal;
-	line-height:1.25em;
-	background-image: url(../images/body-bg.gif);
-	background-position: left top;
-	background-repeat: repeat-x;
-	margin: 0px;
-	padding: 0px;
-}
-
-div.clear {
-	clear:both;
-}
-p { }
-
-td { }
-
-a:link { }
-
-a:visited { }
-
-a:hover { }
-
-a:active { }
-
-div.features {
-	background-image: url(../images/features-bg.gif);
-	background-position: 39px 30px;
-	background-repeat: no-repeat;
-}
-div.feature {
-	float: left;
-	width: 221px;
-	margin-left: 39px;
-	margin-top: 30px;
-	padding: 20px;
-	text-align: left;
-}
-div.feature img {
-	float: left;
-	margin-right: 10px;
-	width: 64px;
-}
-div.feature h2 {
-	margin-top: 0px;
-	margin-bottom: 7px;
-	color: #0499CC;
-	font-size: 155%;
-	line-height: 110%;
-	font-weight: normal;
-	
-}
-div.feature p {
-	margin-top: 0px;
-	padding-top: 0px;
-}
-td.page-header-help a{
-    position:absolute;
-    right:20px;
-}
-div#middle div#workArea {
-    padding:0px;
-}
-.registration_help{
-    color:#555;
-    line-height:25px;
-}
-.toggle_container ,h2.trigger {
-    box-shadow: none;
-}
-.leftCol-med{
-    width:180px;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html
deleted file mode 100644
index 791b867..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~    http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied.  See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <title>Select Usage Plan For Tenant - User Guide</title>
-  <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
-</head>
-
-<body>
-
-
- <h1>Select Usage Plan For Tenant</h1>
-
-
- <h2> <b> Usage Plans(Subscriptions)</b></h2>
-
-<p>
-    According to the usage plan that you selected you will get different volume of service and registry
-    bandwidths other services that available for tenants.By selecting right usage plan that suits
-    your requirements you can get maximum profit
-</p>
-
-
-<h2><b>Multitenancy Free</b></h2>
-<p>
-  This is the free usage plan.You will get limited amount of resources.This package is
-  best suite for evaluation and tests.
-</p>
- <h2><b>Multitenancy Small</b></h2>
-<p>
-   This package is best suite for small business.
-</p>
-<h2><b>Multitenancy Medium</b></h2>
-<p>
-   This usage plan suites for medium scale business.You will get average amount of resources
-    with this package.
-</p>
-<h2><b>Multitenancy Large</b></h2>
-<p>
-   This is the premium usage plan.You will get maximum resources form this plan.
-   This is best suite to large scale business.
-</p>
-
-<p>
-
-   Usage Plan summery
-<table border="1">
-<tr>
-<td>Usage Plan Name</td>
-<td>Number Of Users</td>
-<td>Registry Bandwidth (Mb) </td>
-<td>Service BandWidth (Mb) </td>
-<td>Cost Per Month ($)</td>
-</tr>
-<tr>
-<td>Multitenancy Free</td>
-<td>5</td>
-<td>10</td>
-<td>10</td>
-<td>10</td>
-</tr>
-<tr>
-<td>Multitenancy Small</td>
-<td>10</td>
-<td>25</td>
-<td>25</td>
-<td>25</td>
-</tr>
-<tr>
-<td>Multitenancy Medium</td>
-<td>20</td>
-<td>100</td>
-<td>100</td>
-<td>100</td>
-</tr>
-<tr>
-<td>Multitenancy Large</td>
-<td>50</td>
-<td>200</td>
-<td>200</td>
-<td>200</td>
-</tr>
-</table> 
-<div><strong>Figure1: Usage Plan Summery Table</strong></div>
-</p>
-</body>
-
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/images/add-org.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/images/add-org.png b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/images/add-org.png
deleted file mode 100644
index 3d97bab..0000000
Binary files a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/images/add-org.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/userguide.html
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/userguide.html b/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/userguide.html
deleted file mode 100644
index f97cf59..0000000
--- a/components/org.apache.stratos.tenant.registration.ui/src/main/resources/web/tenant-register/docs/userguide.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. licenses this file to you under the Apache License,
- ~ Version 2.0 (the "License"); you may not use this file except
- ~ in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~    http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied.  See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <title>Multitenancy Tenant Self Registration - User Guide</title>
-  <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
-</head>
-
-<body>
-<h1>Tenant Self Registration</h1>
-
-<p style="font-size:small;">
-You can use this form to register an account for the domain of your organization. You can also check whether the domain is available to register here.
-</p>
-<p style="font-size:small;">
-Optionally you can choose to validate the domain, or can go ahead registering without validating the domain for the moment.
-</p>
-
-<p>
-<img src="images/add-org.png" alt="Register New Organization Form"/>
-<div><strong>Figure1: Register A New Organization Form</strong></div>
-</p>
-
-<p>
-
-<p style="font-size:small;">
-You need to provide the following information to register your organization.
-</p>
-
-
-<table border="1">
-    <thead style="font-size:small;">
-        <td>
-           <b> The Form Field </b>
-        </td>
-        <td >
-            <b>Description</b>
-        </td>
-    </thead>
-    <tbody style="font-size:small;">
-        <tr>
-            <td>Domain</td>
-            <td>Enter the domain name of your organization in here.</td>
-        </tr>
-        <tr>
-            <td>Admin Username</td>
-            <td>The username of the first admin account for your organization. You can use this account to login to all WSO2 Stratos services under your domain name. There
-            is a user management UI that you can access after you login to the system where you can add new users (including users under admin role), new roles.
-            </td>
-        </tr>
-        <tr>
-            <td>First Name</td>
-            <td>Your first name, which will be used to address you in the further communication and the notifications.</td>
-        </tr>
-        <tr>
-            <td>Last Name</td>
-            <td>Your last name.</td>
-        </tr>
-        <tr>
-            <td>Admin Password</td>
-            <td>The password of the startup admin account. You can change the password later from the user management UI.</td>
-        </tr>
-        <tr>
-            <td>Admin Password (Repeat)</td>
-            <td>Repeat the password you provided in the above field, so we can catch any typing mistake you made in there.</td>
-        </tr>
-        <tr>
-            <td>Email</td>
-            <td>Your email address. This email will be used to complete the registration process and to contact you for any further requirement.</td>
-        </tr>
-        <tr>
-            <td>Word Verification</td>
-            <td>Enter the letters shown in the above image in this text box. 
-        </tr>
-    </tbody>
-</table>
-
-</p>
-
-<p style="font-size:small;">
-Once you completed the registration, you will be sent an email notification with the account verification information. 
-</p>
-<p style="font-size:small;">
-After verifying your registration, you can log in to the account using the log in page.
-</p>
-</body>
-
-</html>


[3/3] git commit: Renamed org.apache.stratos.tenant.registration.ui to org.apache.stratos.register.ui. Changed product to use org.apache.stratos.register.ui

Posted by is...@apache.org.
Renamed org.apache.stratos.tenant.registration.ui to org.apache.stratos.register.ui. Changed product to use org.apache.stratos.register.ui


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/78c256c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/78c256c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/78c256c0

Branch: refs/heads/master
Commit: 78c256c09c71b25e462a7dae7c522b5aca88dab7
Parents: 691a0a8
Author: Isuru Perera <is...@apache.org>
Authored: Fri Jul 26 13:53:20 2013 +0530
Committer: Isuru Perera <is...@apache.org>
Committed: Fri Jul 26 13:53:20 2013 +0530

----------------------------------------------------------------------
 .../org.apache.stratos.register.ui/pom.xml      | 133 +++++++
 .../.TenantSelfRegistrationClient.java.swp      | Bin 0 -> 16384 bytes
 .../ui/clients/PackageInfoServiceClient.java    |  77 ++++
 .../clients/TenantSelfRegistrationClient.java   | 108 +++++
 .../register/ui/utils/TenantConfigUtil.java     | 248 ++++++++++++
 .../src/main/resources/META-INF/component.xml   |  71 ++++
 .../register/ui/i18n/JSResources.properties     |   6 +
 .../register/ui/i18n/Resources.properties       |  62 +++
 .../web/tenant-register/css/tenant-register.css |  78 ++++
 .../tenant-register/docs/aboutUsagePlans.html   | 104 +++++
 .../web/tenant-register/docs/images/add-org.png | Bin 0 -> 62035 bytes
 .../web/tenant-register/docs/userguide.html     | 104 +++++
 .../domain_availability_ajaxprocessor.jsp       |  51 +++
 .../get_package_info_ajaxprocessor.jsp          |  40 ++
 .../web/tenant-register/images/ajax-loader.gif  | Bin 0 -> 673 bytes
 .../web/tenant-register/images/body-bg.gif      | Bin 0 -> 419 bytes
 .../web/tenant-register/images/button-back.gif  | Bin 0 -> 819 bytes
 .../images/content-back-left.jpg                | Bin 0 -> 2240 bytes
 .../web/tenant-register/images/content-back.jpg | Bin 0 -> 852 bytes
 .../images/create-org-button.gif                | Bin 0 -> 2576 bytes
 .../tenant-register/images/feature-01-icon.gif  | Bin 0 -> 2825 bytes
 .../tenant-register/images/feature-02-icon.gif  | Bin 0 -> 3361 bytes
 .../tenant-register/images/feature-03-icon.gif  | Bin 0 -> 3285 bytes
 .../web/tenant-register/images/features-bg.gif  | Bin 0 -> 4449 bytes
 .../web/tenant-register/images/footer.jpg       | Bin 0 -> 836 bytes
 .../web/tenant-register/images/forum.gif        | Bin 0 -> 1977 bytes
 .../web/tenant-register/images/header.jpg       | Bin 0 -> 5837 bytes
 .../web/tenant-register/images/help.gif         | Bin 0 -> 1229 bytes
 .../web/tenant-register/images/images.gif       | Bin 0 -> 1067 bytes
 .../tenant-register/images/issue-tracker.gif    | Bin 0 -> 1821 bytes
 .../web/tenant-register/images/logo.jpg         | Bin 0 -> 7171 bytes
 .../web/tenant-register/images/mailing-list.gif | Bin 0 -> 2064 bytes
 .../web/tenant-register/images/page-back.jpg    | Bin 0 -> 871 bytes
 .../web/tenant-register/images/people.gif       | Bin 0 -> 22151 bytes
 .../web/tenant-register/images/services.gif     | Bin 0 -> 604 bytes
 .../tenant-register/images/signup-new-org.gif   | Bin 0 -> 356 bytes
 .../web/tenant-register/images/thememgt.gif     | Bin 0 -> 1030 bytes
 .../web/tenant-register/images/user-guide.gif   | Bin 0 -> 2161 bytes
 .../init_payment_ajaxprocessor.jsp              | 102 +++++
 .../web/tenant-register/js/register_config.js   | 147 +++++++
 .../web/tenant-register/js/select_domain.js     |  75 ++++
 .../web/tenant-register/select_domain.jsp       | 390 +++++++++++++++++++
 .../web/tenant-register/select_usage_plan.jsp   | 280 +++++++++++++
 .../submit_tenant_ajaxprocessor.jsp             |  67 ++++
 .../web/tenant-register/success_register.jsp    |  77 ++++
 .../pom.xml                                     | 133 -------
 .../.TenantSelfRegistrationClient.java.swp      | Bin 16384 -> 0 bytes
 .../ui/clients/PackageInfoServiceClient.java    |  77 ----
 .../clients/TenantSelfRegistrationClient.java   | 108 -----
 .../register/ui/utils/TenantConfigUtil.java     | 248 ------------
 .../src/main/resources/META-INF/component.xml   |  71 ----
 .../register/ui/i18n/JSResources.properties     |   6 -
 .../register/ui/i18n/Resources.properties       |  62 ---
 .../web/tenant-register/css/tenant-register.css |  78 ----
 .../tenant-register/docs/aboutUsagePlans.html   | 104 -----
 .../web/tenant-register/docs/images/add-org.png | Bin 62035 -> 0 bytes
 .../web/tenant-register/docs/userguide.html     | 104 -----
 .../domain_availability_ajaxprocessor.jsp       |  51 ---
 .../get_package_info_ajaxprocessor.jsp          |  40 --
 .../web/tenant-register/images/ajax-loader.gif  | Bin 673 -> 0 bytes
 .../web/tenant-register/images/body-bg.gif      | Bin 419 -> 0 bytes
 .../web/tenant-register/images/button-back.gif  | Bin 819 -> 0 bytes
 .../images/content-back-left.jpg                | Bin 2240 -> 0 bytes
 .../web/tenant-register/images/content-back.jpg | Bin 852 -> 0 bytes
 .../images/create-org-button.gif                | Bin 2576 -> 0 bytes
 .../tenant-register/images/feature-01-icon.gif  | Bin 2825 -> 0 bytes
 .../tenant-register/images/feature-02-icon.gif  | Bin 3361 -> 0 bytes
 .../tenant-register/images/feature-03-icon.gif  | Bin 3285 -> 0 bytes
 .../web/tenant-register/images/features-bg.gif  | Bin 4449 -> 0 bytes
 .../web/tenant-register/images/footer.jpg       | Bin 836 -> 0 bytes
 .../web/tenant-register/images/forum.gif        | Bin 1977 -> 0 bytes
 .../web/tenant-register/images/header.jpg       | Bin 5837 -> 0 bytes
 .../web/tenant-register/images/help.gif         | Bin 1229 -> 0 bytes
 .../web/tenant-register/images/images.gif       | Bin 1067 -> 0 bytes
 .../tenant-register/images/issue-tracker.gif    | Bin 1821 -> 0 bytes
 .../web/tenant-register/images/logo.jpg         | Bin 7171 -> 0 bytes
 .../web/tenant-register/images/mailing-list.gif | Bin 2064 -> 0 bytes
 .../web/tenant-register/images/page-back.jpg    | Bin 871 -> 0 bytes
 .../web/tenant-register/images/people.gif       | Bin 22151 -> 0 bytes
 .../web/tenant-register/images/services.gif     | Bin 604 -> 0 bytes
 .../tenant-register/images/signup-new-org.gif   | Bin 356 -> 0 bytes
 .../web/tenant-register/images/thememgt.gif     | Bin 1030 -> 0 bytes
 .../web/tenant-register/images/user-guide.gif   | Bin 2161 -> 0 bytes
 .../init_payment_ajaxprocessor.jsp              | 102 -----
 .../web/tenant-register/js/register_config.js   | 147 -------
 .../web/tenant-register/js/select_domain.js     |  75 ----
 .../web/tenant-register/select_domain.jsp       | 390 -------------------
 .../web/tenant-register/select_usage_plan.jsp   | 280 -------------
 .../submit_tenant_ajaxprocessor.jsp             |  67 ----
 .../web/tenant-register/success_register.jsp    |  77 ----
 components/pom.xml                              |   1 +
 .../org.apache.stratos.ui.feature/pom.xml       |  34 +-
 92 files changed, 2235 insertions(+), 2240 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/pom.xml b/components/org.apache.stratos.register.ui/pom.xml
new file mode 100644
index 0000000..08eb637
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+  #  Licensed to the Apache Software Foundation (ASF) under one
+  #  or more contributor license agreements.  See the NOTICE file
+  #  distributed with this work for additional information
+  #  regarding copyright ownership.  The ASF licenses this file
+  #  to you under the Apache License, Version 2.0 (the
+  #  "License"); you may not use this file except in compliance
+  #  with the License.  You may obtain a copy of the License at
+  #  
+  #  http://www.apache.org/licenses/LICENSE-2.0
+  #  
+  #  Unless required by applicable law or agreed to in writing,
+  #  software distributed under the License is distributed on an
+  #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  #  KIND, either express or implied.  See the License for the
+  #  specific language governing permissions and limitations
+  #  under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.stratos</groupId>
+        <artifactId>stratos-components-parent</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.stratos.register.ui</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Stratos - Self Registration For New Tenant - User Interface</name>
+
+    <build>
+	<plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Name>${project.artifactId}</Bundle-Name>
+                        <Export-Package>
+                            org.apache.stratos.register.ui.*,
+                        </Export-Package>
+                        <Import-Package>
+                            org.apache.stratos.tenant.register.stub.*; version=${project.version},
+                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
+                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
+                            !javax.xml.namespace,
+                            javax.xml.namespace; version=0.0.0,                            
+                            org.apache.lucene.*,
+                            org.wso2.carbon.captcha.mgt.*,
+                            *;resolution:=optional
+                        </Import-Package>
+                        <Carbon-Component>UIBundle</Carbon-Component>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.registry.common.ui</artifactId>
+	    <version>4.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.registry.core</artifactId>
+            <version>4.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+	    <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.equinox</groupId>
+            <artifactId>javax.servlet</artifactId>
+	    <version>3.0.0.v201112011016</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2.wso2</groupId>
+            <artifactId>axis2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom.wso2</groupId>
+            <artifactId>axiom</artifactId>
+	    <version>1.2.11.wso2v2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.ui</artifactId>
+	    <version>4.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.tenant.register.stub</artifactId>
+	    <version>${project.version}</version>
+        </dependency>
+         <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.common.stub</artifactId>
+	    <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.json.wso2</groupId>
+          <artifactId>json</artifactId>
+	  <version>1.0.0.wso2v1</version>
+        </dependency>
+        <dependency>
+           <groupId>org.wso2.carbon</groupId>
+           <artifactId>org.wso2.carbon.captcha.mgt</artifactId>
+            <version>${wso2carbon.version}</version>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp
new file mode 100644
index 0000000..979870e
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/.TenantSelfRegistrationClient.java.swp differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
new file mode 100644
index 0000000..2979988
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
@@ -0,0 +1,77 @@
+package org.apache.stratos.register.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import org.apache.stratos.common.packages.stub.PackageInfoServiceStub;
+import org.apache.stratos.common.packages.stub.PackageInfo;
+
+/**
+ * PackageInfoService client
+ */
+public class PackageInfoServiceClient {
+
+    private static Log log = LogFactory.getLog(PackageInfoServiceClient.class);
+
+    private PackageInfoServiceStub stub;
+    private String epr;
+
+    public PackageInfoServiceClient(
+            String cookie, String backendServerURL, ConfigurationContext configContext)
+            throws Exception {
+
+        epr = backendServerURL + "PackageInfoService";
+
+        try {
+            stub = new PackageInfoServiceStub(configContext, epr);
+
+            ServiceClient client = stub._getServiceClient();
+            Options option = client.getOptions();
+            option.setManageSession(true);
+            option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+
+        } catch (AxisFault axisFault) {
+            String msg = "Failed to initiate PackageInfoService client. " + axisFault.getMessage();
+            log.error(msg, axisFault);
+            throw new RegistryException(msg, axisFault);
+        }
+    }
+
+    public PackageInfo[] getBillingPackages() throws Exception {
+
+        try {
+            return stub.getPackageInfos();
+        } catch (Exception e) {
+            String msg = "Failed to get package information: " + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+    }
+
+    public JSONArray getBillingPackagesJsonArray() throws Exception {
+
+        try {
+            PackageInfo[] packageInfoArray = stub.getPackageInfos();
+            JSONArray jsonPackageInfoArray = new JSONArray();
+            for (PackageInfo packageInfo : packageInfoArray) {
+                JSONObject packageInfoObj = new JSONObject();
+                packageInfoObj.put("name", packageInfo.getName());
+                //TODO https://wso2.org/jira/browse/STRATOS-1819
+                packageInfoObj.put("subscriptionCharge", packageInfo.getSubscriptionCharge());
+                jsonPackageInfoArray.put(packageInfoObj);
+            }
+            return jsonPackageInfoArray;
+        } catch (Exception e) {
+            String msg = "Failed to get package information: " + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java
new file mode 100644
index 0000000..f7beef6
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/clients/TenantSelfRegistrationClient.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ * KIND, either express or implied.  See the License for the 
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.register.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import org.apache.stratos.tenant.register.stub.TenantMgtServiceStub;
+import org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean;
+import org.apache.stratos.tenant.register.stub.beans.xsd.TenantInfoBean;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpSession;
+
+/**
+ * Tenant Self Registration Client class
+ */
+public class TenantSelfRegistrationClient {
+     private static final Log log = LogFactory.getLog(TenantSelfRegistrationClient.class);
+
+    private TenantMgtServiceStub stub;
+    private String epr;
+
+    public TenantSelfRegistrationClient(
+            String cookie, String backendServerURL, ConfigurationContext configContext)
+            throws RegistryException {
+
+        epr = backendServerURL + "TenantMgtService";
+
+        try {
+            stub = new TenantMgtServiceStub(configContext, epr);
+
+            ServiceClient client = stub._getServiceClient();
+            Options option = client.getOptions();
+            option.setManageSession(true);
+            option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+
+        } catch (AxisFault axisFault) {
+            String msg = "Failed to initiate AddServices service client. " + axisFault.getMessage();
+            log.error(msg, axisFault);
+            throw new RegistryException(msg, axisFault);
+        }
+    }
+
+    public TenantSelfRegistrationClient(ServletConfig config, HttpSession session)
+            throws RegistryException {
+
+        String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+        String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+        ConfigurationContext configContext = (ConfigurationContext) config.
+                getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+        epr = backendServerURL + "TenantMgtService";
+
+        try {
+            stub = new TenantMgtServiceStub(configContext, epr);
+
+            ServiceClient client = stub._getServiceClient();
+            Options option = client.getOptions();
+            option.setManageSession(true);
+            option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+
+        } catch (AxisFault axisFault) {
+            String msg = "Failed to initiate Add Services service client. " + axisFault.getMessage();
+            log.error(msg, axisFault);
+            throw new RegistryException(msg, axisFault);
+        }
+    }
+
+    public String registerTenant(TenantInfoBean tenantInfoBean,
+                                 CaptchaInfoBean captchaInfoBean) throws Exception {
+        return stub.registerTenant(tenantInfoBean, captchaInfoBean);
+     }
+
+    public boolean checkDomainAvailability(String domainName) throws Exception {
+        return stub.checkDomainAvailability(domainName);
+    }
+
+    public String validateOrSuggestDomain(String domainName, String successKey) throws Exception {
+        return stub.validateOrSuggestDomain(domainName, successKey);
+    }
+
+    public CaptchaInfoBean generateRandomCaptcha() throws Exception {
+        return stub.generateRandomCaptcha();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java
new file mode 100644
index 0000000..14d9104
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/java/org/apache/stratos/register/ui/utils/TenantConfigUtil.java
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ * KIND, either express or implied.  See the License for the 
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.register.ui.utils;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.util.Base64;
+import org.apache.axis2.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.constants.StratosConstants;
+import org.apache.stratos.register.ui.clients.TenantSelfRegistrationClient;
+import org.wso2.carbon.registry.common.ui.UIException;
+import org.apache.stratos.tenant.register.stub.beans.xsd.CaptchaInfoBean;
+import org.apache.stratos.tenant.register.stub.beans.xsd.TenantInfoBean;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.StringReader;
+import java.util.Calendar;
+import java.util.Iterator;
+
+/**
+ * Utility methods for tenant configuration
+ */
+public class TenantConfigUtil {
+    private static final Log log = LogFactory.getLog(TenantConfigUtil.class);
+
+    /**
+     * Registers the tenant
+     *
+     * @param request HttpServletRequest
+     * @param config  ServletConfig
+     * @param session HttpSession
+     * @return String
+     * @throws UIException
+     */
+    public static String registerTenantConfigBean(HttpServletRequest request,
+                                                  ServletConfig config, HttpSession session) throws UIException {
+        TenantInfoBean tenantInfoBean = new TenantInfoBean();
+        CaptchaInfoBean captchaInfoBean = new CaptchaInfoBean();
+
+        try {
+            // filling tenant info.
+            tenantInfoBean.setFirstname(request.getParameter("admin-firstname"));
+            tenantInfoBean.setLastname(request.getParameter("admin-lastname"));
+            tenantInfoBean.setAdmin(request.getParameter("admin"));
+            tenantInfoBean.setAdminPassword(request.getParameter("admin-password"));
+            tenantInfoBean.setTenantDomain(resolveDomainName(request.getParameter("domain")));
+            tenantInfoBean.setEmail(request.getParameter("admin-email"));
+            tenantInfoBean.setSuccessKey((String) session.getAttribute("validate-domain-success-key"));
+            tenantInfoBean.setUsagePlan(request.getParameter("selectedUsagePlan"));
+            tenantInfoBean.setOriginatedService(TenantConfigUtil.base64Decode((String) session.getAttribute(
+                    StratosConstants.ORIGINATED_SERVICE)));
+            tenantInfoBean.setCreatedDate(Calendar.getInstance());
+            // filling captcha info
+            captchaInfoBean.setSecretKey(request.getParameter("captcha-secret-key"));
+            captchaInfoBean.setUserAnswer(request.getParameter("captcha-user-answer"));
+
+            TenantSelfRegistrationClient selfRegistrationClient =
+                    new TenantSelfRegistrationClient(config, session);
+
+            String returnText = selfRegistrationClient.registerTenant(tenantInfoBean, captchaInfoBean);
+
+            return returnText;
+
+        } catch (Exception e) {
+            AxisFault fault = new AxisFault(e.getMessage());
+            String msg = fault.getReason() + " Failed to add tenant config. tenant-domain: " +
+                    tenantInfoBean.getTenantDomain() + ", " +
+                    "tenant-admin: " + tenantInfoBean.getAdmin() + ".";
+            log.error(msg, e);
+            // we are preserving the original message.
+            throw new UIException(e.getMessage(), e);
+        }
+    }
+
+
+    // do this before the send redirect.
+
+    public static void setSubmissionValuesForSession(HttpServletRequest request) {
+        HttpSession session = request.getSession();
+
+        session.setAttribute("submit-domain", resolveDomainName(request.getParameter("domain")));
+        session.setAttribute("submit-admin", request.getParameter("admin"));
+        session.setAttribute("submit-admin-firstname", request.getParameter("admin-firstname"));
+        session.setAttribute("submit-admin-lastname", request.getParameter("admin-lastname"));
+        session.setAttribute("submit-admin-email", request.getParameter("admin-email"));
+    }
+
+
+    /**
+     * Checks the availability of the domain
+     *
+     * @param request HttpServletRequest
+     * @param config  ServletConfig
+     * @param session HttpSession
+     * @return true, if domain is available to register
+     * @throws UIException if failed to check the availability.
+     */
+    public static boolean checkDomainAvailability(
+            HttpServletRequest request, ServletConfig config, HttpSession session)
+            throws UIException {
+        String tenantDomain = null;
+        try {
+            tenantDomain = resolveDomainName(request.getParameter("domain"));
+            TenantSelfRegistrationClient selfRegistrationClient =
+                    new TenantSelfRegistrationClient(config, session);
+            return selfRegistrationClient.checkDomainAvailability(tenantDomain);
+        } catch (Exception e) {
+            String msg = "Failed to check the domain availability:" + tenantDomain + ".";
+            log.error(msg, e);
+            throw new UIException(msg, e);
+        }
+    }
+
+    /**
+     * Validates or suggests the domain
+     *
+     * @param config  ServletConfig
+     * @param session HttpSession
+     * @return domain
+     * @throws UIException, if validating or suggesting the domain failed.
+     */
+    public static String validateOrSuggestDomain(ServletConfig config,
+                                                 HttpSession session) throws UIException {
+        String tempDomainToRegister = resolveDomainName(
+                (String) session.getAttribute("temp-domain-to-register"));
+        // here successKey can be null, in such cases services will directly go to suggest a name
+        String successKey = (String) session.getAttribute("validate-domain-success-key");
+
+        try {
+            TenantSelfRegistrationClient selfRegistrationClient =
+                    new TenantSelfRegistrationClient(config, session);
+            return selfRegistrationClient.validateOrSuggestDomain(tempDomainToRegister, successKey);
+        } catch (Exception e) {
+            String msg = "Failed to validate or suggest a domain related to :" +
+                    tempDomainToRegister + ".";
+            log.error(msg, e);
+            throw new UIException(msg, e);
+        }
+    }
+
+    /**
+     * Generates a random captcha
+     *
+     * @param config  ServletConfig
+     * @param session HttpSession
+     * @return CaptchaInfoBean
+     * @throws UIException, if generating the random captcha fails.
+     */
+    public static CaptchaInfoBean generateRandomCaptcha(ServletConfig config,
+                                                        HttpSession session) throws UIException {
+        try {
+            TenantSelfRegistrationClient selfRegistrationClient =
+                    new TenantSelfRegistrationClient(config, session);
+            return selfRegistrationClient.generateRandomCaptcha();
+        } catch (Exception e) {
+            String msg = "Error in generating the captcha image.";
+            log.error(msg, e);
+            throw new UIException(msg, e);
+        }
+    }
+
+    public static HttpServletRequest readIntermediateData(HttpServletRequest request, String data) {
+        try {
+            XMLStreamReader parser =
+                    XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(data));
+            StAXOMBuilder builder = new StAXOMBuilder(parser);
+            OMElement documentElement = builder.getDocumentElement();
+            Iterator it = documentElement.getChildElements();
+            while (it.hasNext()) {
+                OMElement element = (OMElement) it.next();
+                if ("admin".equals(element.getLocalName())) {
+                    request.setAttribute("admin", element.getText());
+                } else if ("firstname".equals(element.getText())) {
+                    request.setAttribute("firstname", element.getText());
+                } else if ("lastname".equals(element.getText())) {
+                    request.setAttribute("lastname", element.getText());
+                } else if ("email".equals(element.getLocalName())) {
+                    request.setAttribute("email", element.getText());
+                } else if ("tenantDomain".equals(element.getLocalName())) {
+                    request.setAttribute("tenantDomain", element.getText());
+                } else if ("confirmationKey".equals(element.getLocalName())) {
+                    request.setAttribute("confirmationKey", element.getText());
+                }
+            }
+        } catch (Exception e) {
+            log.error("Error parsing xml", e);
+        }
+        return request;
+    }
+
+    /**
+     * Resolves the correct domain name in the form of example.com from the user input domain name.
+     * Currently strips out "www."and white space. Can add more checks.
+     *
+     * @param domainNameUserInput the user input domain name
+     * @return the domain after removing (if entered) www. from the input.
+     */
+    public static String resolveDomainName(String domainNameUserInput) {
+        if (domainNameUserInput == null) {
+            String msg = "Provided domain name is null";
+            log.error(msg);
+            return "";
+        }
+        String domainName = domainNameUserInput.trim();
+        if (domainName.startsWith("www.")) {
+            domainName = domainName.substring(4);
+        }
+        return domainName;
+    }
+
+    /**
+     * A basic method to decode the encoded Stratos Service Name
+     *
+     * @param encodedStr Encoded Stratos Service Name
+     * @return Decoded Stratos Service name
+     */
+    private static String base64Decode(String encodedStr) {
+        String decodedStr = null;
+        // Check whether this value is null(not set) or set to "null" which is also possible.
+        if (encodedStr != null && !"null".equals(encodedStr)) {
+            decodedStr = new String(Base64.decode(encodedStr));
+        }
+        return decodedStr;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/META-INF/component.xml b/components/org.apache.stratos.register.ui/src/main/resources/META-INF/component.xml
new file mode 100644
index 0000000..c9b752a
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/META-INF/component.xml
@@ -0,0 +1,71 @@
+<!-- 
+  #  Licensed to the Apache Software Foundation (ASF) under one
+  #  or more contributor license agreements.  See the NOTICE file
+  #  distributed with this work for additional information
+  #  regarding copyright ownership.  The ASF licenses this file
+  #  to you under the Apache License, Version 2.0 (the
+  #  "License"); you may not use this file except in compliance
+  #  with the License.  You may obtain a copy of the License at
+  #  
+  #  http://www.apache.org/licenses/LICENSE-2.0
+  #  
+  #  Unless required by applicable law or agreed to in writing,
+  #  software distributed under the License is distributed on an
+  #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  #  KIND, either express or implied.  See the License for the
+  #  specific language governing permissions and limitations
+  #  under the License.
+  -->
+<component xmlns="http://products.wso2.org/carbon">
+    <!-- sample menu configuration -->
+    <menus>
+        <menu>
+            <id>gaas_menu</id>
+            <i18n-key>gaas</i18n-key>
+            <i18n-bundle>org.wso2.carbon.register.ui.i18n.Resources</i18n-bundle>
+            <parent-menu></parent-menu>
+            <link>#</link>
+            <skip-authentication/>
+            <region>region1</region>
+            <order>2</order>
+            <style-class>home</style-class>
+        </menu>
+        <menu>
+            <id>gaas_register_org_menu</id>
+            <i18n-key>register.org.menu</i18n-key>
+            <i18n-bundle>org.wso2.carbon.register.ui.i18n.Resources</i18n-bundle>
+            <parent-menu>gaas_menu</parent-menu>
+            <link>../tenant-register/select_domain.jsp</link>
+            <region>region1</region>
+            <order>1</order>
+            <style-class>manage</style-class>
+            <icon>../tenant-register/images/signup-new-org.gif</icon>
+            <skip-authentication>
+                <skip-link>../tenant-register/self_registration_complete.jsp</skip-link>
+                <skip-link>../tenant-register/domain_availability_ajaxprocessor.jsp</skip-link>
+                <skip-link>../tenant-register/select_domain.jsp</skip-link>
+                <skip-link>../tenant-register/select_usage_plan.jsp</skip-link>
+                <skip-link>../tenant-register/success_register.jsp</skip-link>
+
+                <!-- the following files need to be placed in the validate-domain ui component,
+                 but since it has no menu, it had to be moved here -->
+                <skip-link>../validate-domain/validate_domain_not_logged_in.jsp</skip-link>
+                <skip-link>../validate-domain/validate_with_dns_ajaxprocessor.jsp</skip-link>
+                <skip-link>../validate-domain/validate_with_text_ajaxprocessor.jsp</skip-link>
+                <skip-link>../validate-domain/submit_validate_domain_ajaxprocessor.jsp</skip-link>
+
+                <!-- account-mgt stuff -->
+                <skip-link>../account-mgt/update_verifier.jsp</skip-link>
+                <skip-link>../email-verification/validator_ajaxprocessor.jsp</skip-link>
+                <skip-link>../email-verification/invalid_email.jsp</skip-link>
+                <skip-link>../account-mgt/update_verifier_redirector_ajaxprocessor.jsp</skip-link>
+
+                <!--payment stuff -->
+                <skip-link>../payment/registration_payment.jsp</skip-link>
+                <skip-link>../payment/registration_payment_completed.jsp</skip-link>
+            </skip-authentication>
+            <require-not-logged-in>true</require-not-logged-in>
+        </menu>
+    </menus>
+
+</component>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties b/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties
new file mode 100644
index 0000000..c49c4b0
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/JSResources.properties
@@ -0,0 +1,6 @@
+password.mismatched=Passwords do not match.
+email.mismatched=The emails are mismatching.
+current.password.should.provided=You should provide the current password in order to change the password.
+password.length=Your password must be at least 6 characters long. Try again.
+domain.available=Domain is available to register.
+domain.unavailable=Sorry!. The Domain is already registered. Please choose a different domain.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties b/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties
new file mode 100644
index 0000000..b757c4f
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/org/apache/stratos/register/ui/i18n/Resources.properties
@@ -0,0 +1,62 @@
+submit.tenant=Submit Tenant
+domain=Tenant Domain
+domain.information=Domain Information
+terms.of.use=Terms of Use
+contact.details=Contact Details
+admin.username=Admin Username
+username=Username
+username.or.domain=Username/Domain
+current.admin.password=Current Admin Password
+new.admin.password=New Admin Password
+new.admin.password.repeat=New Admin Password (Repeat)
+admin.password=Admin Password
+admin.password.repeat=Admin Password (Repeat)
+govern.add_tenants.menu=Add New Tenant
+govern.view_tenants.menu=View Tenants
+overview=Overview
+tenants.list=Tenants List
+company.organization=Company/Organization
+admin.contact=Admin Contact
+edit=Edit
+multitenancy=Multitenancy
+added.successfully=You have successfully added a new tenant with domain:
+updated.successfully=You have successfully updated the tenant with domain:
+update.added.tenant=Update the just added/updated tenant
+update.tenant=Update Tenant
+add.new.tenant=Add a new tenant
+register.new.organization=Sign up your organization
+view.all.tenants=View all tenants
+tenant.admin=Tenant Admin
+tenant.description=Tenant Description
+admin.fullname=Full Name
+admin.firstname=First Name
+admin.lastname=Last Name
+admin.address=Address
+admin.email=Email
+admin.email.repeat=Email (Repeat)
+admin.telephone=Telephone
+admin.im=IM
+admin.url=URL
+self.registration=Registry Tenant
+gaas=Sign up
+register.org.menu=Sign up new organization
+gaas.register.a.new.tenant=Register A New Tenant
+active=Active
+theme.management=Theme Management
+word.verification=Word Verification
+captcha.message=Type the characters you see in the picture below.
+select.domain.menu=Sign up new organization
+select.domain.title=Select a domain for your organization
+password.reset=Password Reset
+password.reset.failed=Password Reset Attempt Failed
+verified.request.successfully=You have successfully verified your Password reset request.\nPls reset your password below.
+request.verification.failed=Password Reset Verification Failed. \nPls make sure you have clicked the correct link to reset your domain's admin password.
+accept.eula=I have read and accepted the terms in the license agreement above.
+usage.plan.information= Usage Plan Information
+select.usage.plan.for.tenant=Select Usage Plan For Tenant
+demo.package.price=$0 per month
+select.package.message=According to the selected plan, resources will be allocated for you. You can upgrade or downgrade your plan later according to your requirements. If you need more information on plans, click 'Pricing Info'.
+required.msg=All fields marked with an asterisk (<span class="required">*</span>) are required. 
+billing.currency=$
+redirect.to.paypal.msg1=You will be redirected to PayPal to make a registration payment of
+redirect.to.paypal.msg2=Do you wish to proceed?  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/css/tenant-register.css
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/css/tenant-register.css b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/css/tenant-register.css
new file mode 100644
index 0000000..621c028
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/css/tenant-register.css
@@ -0,0 +1,78 @@
+body {
+	color:#111111;
+	font-size:0.75em;
+	font-size-adjust:none;
+	font-style:normal;
+	font-variant:normal;
+	font-weight:normal;
+	line-height:1.25em;
+	background-image: url(../images/body-bg.gif);
+	background-position: left top;
+	background-repeat: repeat-x;
+	margin: 0px;
+	padding: 0px;
+}
+
+div.clear {
+	clear:both;
+}
+p { }
+
+td { }
+
+a:link { }
+
+a:visited { }
+
+a:hover { }
+
+a:active { }
+
+div.features {
+	background-image: url(../images/features-bg.gif);
+	background-position: 39px 30px;
+	background-repeat: no-repeat;
+}
+div.feature {
+	float: left;
+	width: 221px;
+	margin-left: 39px;
+	margin-top: 30px;
+	padding: 20px;
+	text-align: left;
+}
+div.feature img {
+	float: left;
+	margin-right: 10px;
+	width: 64px;
+}
+div.feature h2 {
+	margin-top: 0px;
+	margin-bottom: 7px;
+	color: #0499CC;
+	font-size: 155%;
+	line-height: 110%;
+	font-weight: normal;
+	
+}
+div.feature p {
+	margin-top: 0px;
+	padding-top: 0px;
+}
+td.page-header-help a{
+    position:absolute;
+    right:20px;
+}
+div#middle div#workArea {
+    padding:0px;
+}
+.registration_help{
+    color:#555;
+    line-height:25px;
+}
+.toggle_container ,h2.trigger {
+    box-shadow: none;
+}
+.leftCol-med{
+    width:180px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html
new file mode 100644
index 0000000..791b867
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/aboutUsagePlans.html
@@ -0,0 +1,104 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>Select Usage Plan For Tenant - User Guide</title>
+  <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
+</head>
+
+<body>
+
+
+ <h1>Select Usage Plan For Tenant</h1>
+
+
+ <h2> <b> Usage Plans(Subscriptions)</b></h2>
+
+<p>
+    According to the usage plan that you selected you will get different volume of service and registry
+    bandwidths other services that available for tenants.By selecting right usage plan that suits
+    your requirements you can get maximum profit
+</p>
+
+
+<h2><b>Multitenancy Free</b></h2>
+<p>
+  This is the free usage plan.You will get limited amount of resources.This package is
+  best suite for evaluation and tests.
+</p>
+ <h2><b>Multitenancy Small</b></h2>
+<p>
+   This package is best suite for small business.
+</p>
+<h2><b>Multitenancy Medium</b></h2>
+<p>
+   This usage plan suites for medium scale business.You will get average amount of resources
+    with this package.
+</p>
+<h2><b>Multitenancy Large</b></h2>
+<p>
+   This is the premium usage plan.You will get maximum resources form this plan.
+   This is best suite to large scale business.
+</p>
+
+<p>
+
+   Usage Plan summery
+<table border="1">
+<tr>
+<td>Usage Plan Name</td>
+<td>Number Of Users</td>
+<td>Registry Bandwidth (Mb) </td>
+<td>Service BandWidth (Mb) </td>
+<td>Cost Per Month ($)</td>
+</tr>
+<tr>
+<td>Multitenancy Free</td>
+<td>5</td>
+<td>10</td>
+<td>10</td>
+<td>10</td>
+</tr>
+<tr>
+<td>Multitenancy Small</td>
+<td>10</td>
+<td>25</td>
+<td>25</td>
+<td>25</td>
+</tr>
+<tr>
+<td>Multitenancy Medium</td>
+<td>20</td>
+<td>100</td>
+<td>100</td>
+<td>100</td>
+</tr>
+<tr>
+<td>Multitenancy Large</td>
+<td>50</td>
+<td>200</td>
+<td>200</td>
+<td>200</td>
+</tr>
+</table> 
+<div><strong>Figure1: Usage Plan Summery Table</strong></div>
+</p>
+</body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/images/add-org.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/images/add-org.png b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/images/add-org.png
new file mode 100644
index 0000000..3d97bab
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/images/add-org.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/userguide.html
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/userguide.html b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/userguide.html
new file mode 100644
index 0000000..f97cf59
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/docs/userguide.html
@@ -0,0 +1,104 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>Multitenancy Tenant Self Registration - User Guide</title>
+  <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
+</head>
+
+<body>
+<h1>Tenant Self Registration</h1>
+
+<p style="font-size:small;">
+You can use this form to register an account for the domain of your organization. You can also check whether the domain is available to register here.
+</p>
+<p style="font-size:small;">
+Optionally you can choose to validate the domain, or can go ahead registering without validating the domain for the moment.
+</p>
+
+<p>
+<img src="images/add-org.png" alt="Register New Organization Form"/>
+<div><strong>Figure1: Register A New Organization Form</strong></div>
+</p>
+
+<p>
+
+<p style="font-size:small;">
+You need to provide the following information to register your organization.
+</p>
+
+
+<table border="1">
+    <thead style="font-size:small;">
+        <td>
+           <b> The Form Field </b>
+        </td>
+        <td >
+            <b>Description</b>
+        </td>
+    </thead>
+    <tbody style="font-size:small;">
+        <tr>
+            <td>Domain</td>
+            <td>Enter the domain name of your organization in here.</td>
+        </tr>
+        <tr>
+            <td>Admin Username</td>
+            <td>The username of the first admin account for your organization. You can use this account to login to all WSO2 Stratos services under your domain name. There
+            is a user management UI that you can access after you login to the system where you can add new users (including users under admin role), new roles.
+            </td>
+        </tr>
+        <tr>
+            <td>First Name</td>
+            <td>Your first name, which will be used to address you in the further communication and the notifications.</td>
+        </tr>
+        <tr>
+            <td>Last Name</td>
+            <td>Your last name.</td>
+        </tr>
+        <tr>
+            <td>Admin Password</td>
+            <td>The password of the startup admin account. You can change the password later from the user management UI.</td>
+        </tr>
+        <tr>
+            <td>Admin Password (Repeat)</td>
+            <td>Repeat the password you provided in the above field, so we can catch any typing mistake you made in there.</td>
+        </tr>
+        <tr>
+            <td>Email</td>
+            <td>Your email address. This email will be used to complete the registration process and to contact you for any further requirement.</td>
+        </tr>
+        <tr>
+            <td>Word Verification</td>
+            <td>Enter the letters shown in the above image in this text box. 
+        </tr>
+    </tbody>
+</table>
+
+</p>
+
+<p style="font-size:small;">
+Once you completed the registration, you will be sent an email notification with the account verification information. 
+</p>
+<p style="font-size:small;">
+After verifying your registration, you can log in to the account using the log in page.
+</p>
+</body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
new file mode 100644
index 0000000..f442459
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
@@ -0,0 +1,51 @@
+<!-- 
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<%@ page import="org.wso2.carbon.registry.core.RegistryConstants" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
+<%@ page import="org.wso2.carbon.registry.common.ui.UIException" %>
+<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
+<%@ page import="java.util.Enumeration" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+
+<%
+try {
+    boolean domainAvailable = TenantConfigUtil.checkDomainAvailability(request, config, session);
+
+    if (domainAvailable) {
+    %>
+    ----DomainAvailable----
+    <%
+    }
+    else {
+    %>
+    ----DomainUnavailable----
+    <%
+    }
+} catch (UIException e) {
+
+%>
+    Error in checking the domain availability.
+    please retry the registration from the <a href="../tenant-register/select_domain.jsp">start</a>.
+<%
+}
+
+%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
new file mode 100644
index 0000000..9ce01d5
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
@@ -0,0 +1,40 @@
+<!-- 
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.json.JSONArray" %>
+<%@ page import="org.wso2.carbon.register.ui.clients.PackageInfoServiceClient" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+
+<%
+
+    String backendServerUrl = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+    String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+    ConfigurationContext configContext =
+            (ConfigurationContext)config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+    PackageInfoServiceClient client = new PackageInfoServiceClient(cookie, backendServerUrl,configContext);
+    JSONArray packageInfoArray = client.getBillingPackagesJsonArray();
+
+    out.write(packageInfoArray.toString());
+%>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif
new file mode 100644
index 0000000..f2a1bc0
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/ajax-loader.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/body-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/body-bg.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/body-bg.gif
new file mode 100644
index 0000000..5db1464
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/body-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/button-back.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/button-back.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/button-back.gif
new file mode 100644
index 0000000..6a52e34
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/button-back.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg
new file mode 100644
index 0000000..ebfe8ed
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back-left.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back.jpg b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back.jpg
new file mode 100644
index 0000000..62b8da1
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/content-back.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/create-org-button.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/create-org-button.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/create-org-button.gif
new file mode 100644
index 0000000..b7e62a3
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/create-org-button.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif
new file mode 100644
index 0000000..ff3ba26
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-01-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif
new file mode 100644
index 0000000..ee4cb66
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-02-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif
new file mode 100644
index 0000000..8f3c2a1
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/feature-03-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/features-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/features-bg.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/features-bg.gif
new file mode 100644
index 0000000..dd9e693
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/features-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/footer.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/footer.jpg b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/footer.jpg
new file mode 100644
index 0000000..c617091
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/footer.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/forum.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/forum.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/forum.gif
new file mode 100644
index 0000000..e92779a
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/forum.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/header.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/header.jpg b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/header.jpg
new file mode 100644
index 0000000..4438a06
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/header.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/help.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/help.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/help.gif
new file mode 100644
index 0000000..43242c2
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/help.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/images.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/images.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/images.gif
new file mode 100644
index 0000000..94b46dc
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/images.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif
new file mode 100644
index 0000000..9029c12
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/issue-tracker.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/logo.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/logo.jpg b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/logo.jpg
new file mode 100644
index 0000000..202360d
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/logo.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/mailing-list.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/mailing-list.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/mailing-list.gif
new file mode 100644
index 0000000..06d61e3
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/mailing-list.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/page-back.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/page-back.jpg b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/page-back.jpg
new file mode 100644
index 0000000..2e21b54
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/page-back.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/people.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/people.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/people.gif
new file mode 100644
index 0000000..edfa49b
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/people.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/services.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/services.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/services.gif
new file mode 100755
index 0000000..9883116
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/services.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif
new file mode 100644
index 0000000..640a501
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/signup-new-org.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/thememgt.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/thememgt.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/thememgt.gif
new file mode 100644
index 0000000..e554e87
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/thememgt.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/user-guide.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/user-guide.gif b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/user-guide.gif
new file mode 100644
index 0000000..9342adc
Binary files /dev/null and b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/images/user-guide.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
new file mode 100755
index 0000000..e1112fd
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
@@ -0,0 +1,102 @@
+<!-- 
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.json.JSONArray"%>
+<%@ page import="org.wso2.carbon.CarbonConstants" %>
+<%@ page import="org.wso2.carbon.register.ui.clients.PackageInfoServiceClient" %>
+<%@ page import="org.apache.stratos.common.util.CommonUtil" %>
+<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
+<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
+<%@ page import="java.util.Collections" %>
+<%@ page import="java.util.Enumeration" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="java.util.List" %>
+<%@ page import="java.util.Map" %>
+<%@ page import="org.json.JSONException" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
+<carbon:jsi18n
+		resourceBundle="org.wso2.carbon.register.ui.i18n.JSResources"
+		request="<%=request%>" />
+<script type="text/javascript" src="../registry_common/js/registry_validation.js"></script>
+<script type="text/javascript" src="../registry_common/js/registry_common.js"></script>
+<script type="text/javascript" src="../ajax/js/prototype.js"></script>
+<script type="text/javascript" src="js/register_config.js"></script>
+<script type="text/javascript" src="../admin/js/jquery.js"></script>
+<script type="text/javascript" src="../admin/js/jquery.form.js"></script>
+<script type="text/javascript" src="../dialog/js/jqueryui/jquery-ui.min.js"></script>
+<%
+    String tenantDomain = request.getParameter("domain");
+    // The actual usage plan the tenant selects in select_usage_plan.jsp
+    String selectedUsagePlan = request.getParameter("selectedUsagePlan");
+    session.setAttribute("selectedUsagePlan", selectedUsagePlan);
+    
+    String backendServerUrl = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+    String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+    ConfigurationContext configContext =
+            (ConfigurationContext)config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+
+    PackageInfoServiceClient client = new PackageInfoServiceClient(cookie, backendServerUrl,configContext);
+    JSONArray packageInfoArray = client.getBillingPackagesJsonArray();
+    String amount = "0";
+
+    for (int i = 0; i < packageInfoArray.length(); i++) {
+        try {
+            if (packageInfoArray.getJSONObject(i).getString("name").equals(selectedUsagePlan)) {
+                amount = packageInfoArray.getJSONObject(i).getString("subscriptionCharge");
+            }
+        } catch (JSONException e) {
+            //
+        }
+    }
+
+    String successUrl;
+    String paypalUrl = CommonUtil.getStratosConfig().getPaypalUrl();
+    String adminConsoleURL = CarbonUIUtil.getAdminConsoleURL(request);
+    adminConsoleURL = adminConsoleURL.substring(0, adminConsoleURL.indexOf("carbon"));
+     successUrl = adminConsoleURL + "carbon/payment/registration_payment.jsp";
+    String cancelUrl = adminConsoleURL + "carbon/admin/login.jsp";
+%>
+
+<script type="text/javascript">
+
+
+        var successUrl = '<%=successUrl%>';
+        var cancelUrl = '<%=cancelUrl%>';
+        var amount = '<%=amount%>';
+        var tenantDomain = '<%=tenantDomain%>';
+        jQuery.ajax({
+            type: 'GET',
+            url: '../payment/setEC-ajaxprocessor.jsp',
+            data: 'successUrl=' + successUrl + '&cancelUrl=' + cancelUrl + '&amount=' + amount + '&tenantDomain=' + tenantDomain,
+            dataType: 'json',
+            async: false,
+            success: function(msg) {
+                var resp = msg;
+                if(resp.ack=='Success'){
+                    location.href = '<%=paypalUrl%>' + resp.token;
+                }else{
+                    location.href = cancelUrl;
+                }
+            },
+            error:function () {
+                location.href = cancelUrl;
+            }
+        });
+</script>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/register_config.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/register_config.js b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/register_config.js
new file mode 100644
index 0000000..fdcd24e
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/register_config.js
@@ -0,0 +1,147 @@
+function addTenant(isPublicCloud) {
+    var domain = document.getElementById('domain');
+    var reason = "";
+    var addTenantForm = document.getElementById('addTenantForm');
+    var adminPassword = "";
+    var adminPasswordRepeat = "";
+    var email = "";
+    var firstname = document.getElementById('admin-firstname');
+    var lastname = document.getElementById('admin-lastname');
+    var adminName = document.getElementById('admin');
+    adminPassword = document.getElementById('admin-password');
+    adminPasswordRepeat = document.getElementById('admin-password-repeat');
+    email = document.getElementById('admin-email');
+
+    // the domain validation part is moved to the select_domain.js
+
+    var reason = validateEmpty(domain, "Domain");
+    if (reason == "") {
+        reason += checkDomain(domain, isPublicCloud);
+    }
+    if (reason == "") {
+        reason += validateEmpty(firstname, "First Name");
+    }
+    if (reason == "") {
+        reason += validateIllegal(firstname, "First Name");
+    }
+    if (reason == "") {
+        reason += validateEmpty(lastname, "Last Name");
+    }
+    if (reason == "") {
+        reason += validateIllegal(lastname, "Last Name");
+    }
+    if (reason == "") {
+        reason += validateEmpty(adminName, "Admin Username");
+    }
+    if (reason == "") {
+        reason += validateIllegal(adminName, "Admin Username");
+    }
+    if (reason == "") {
+        reason += validateUsername(adminName);
+    }
+    if (reason == "") {
+        reason += validateEmpty(adminPassword, "Admin Password");
+    }
+    if (reason == "") {
+        reason += validateAdminPassword(adminPassword);
+    }
+    if (reason == "") {
+        reason += validateEmpty(adminPasswordRepeat, "Admin Password (Repeat)");
+    }
+    if (reason == "") {
+        reason += validateEmpty(email, "Email");
+    }
+    if (reason == "") {
+        reason += validateEmail(email);
+    }
+    if (reason == "") {
+        if (adminPassword.value != adminPasswordRepeat.value) {
+            reason += jsi18n["password.mismatched"];
+        }
+        if (adminPassword.value.length < 6) {
+            reason += jsi18n["password.length"];
+        }
+    }
+    if (reason != "") {
+        CARBON.showWarningDialog(reason);
+        document.getElementbyId("submit-button").disabled = false;
+        document.getElementById('waitMessage').style.display = 'none';
+        return;
+    }
+    addTenantForm.submit();
+}
+
+function validateAdminPassword(fld) {
+    var error = "";
+
+    if (fld.value == "") {
+        error = org_wso2_carbon_registry_common_ui_jsi18n["no.password"] + "<br />";
+    } /* else if ((fld.value.length < 3) || (fld.value.length > 15)) {
+     error = org_wso2_carbon_registry_common_ui_jsi18n["wrong.password"] + "<br />";
+     } else if (illegalChars.test(fld.value)) {
+     error = org_wso2_carbon_registry_common_ui_jsi18n["illegal.password"] + "<br />";
+     } else if (!((fld.value.search(/(a-z)+/)) && (fld.value.search(/(0-9)+/)))) {
+     error = "The password must contain at least one numeral.<br />";
+     } */ else {
+        fld.style.background = 'White';
+    }
+    return error;
+}
+
+function activationChanged(cbox, domain) {
+    if (!cbox.checked) {
+        CARBON.showConfirmationDialog("Are you sure you want to deactivate the domain: " +
+                                      domain + ".", function() {
+            var submitForm = document.getElementById(domain + "_form");
+            submitForm.submit();
+        }, function() {
+            cbox.checked = "on";
+        });
+    } else {
+        var submitForm = document.getElementById(domain + "_form");
+        submitForm.submit();
+    }
+}
+
+function fillAdminValue() {
+    var adminValue = document.getElementById('adminValue');
+    var domain = document.getElementById('domain');
+
+    var reason = validateIllegal(domain, "Domain");
+    if (reason != "") {
+        CARBON.showErrorDialog(reason);
+        adminValue.innerHTML = '';
+        return;
+    }
+
+    if (domain.value == "") {
+        adminValue.innerHTML = '' + domain.value;
+    }
+    else {
+        adminValue.innerHTML = '@' + domain.value;
+    }
+}
+
+function showregistrationfail() {
+    var error = "";
+    CARBON.showWarningDialog(error);
+}
+
+var kaptchaImgUrl;
+function showKaptcha(kaptchaImgUrlArg) {
+    kaptchaImgUrl = kaptchaImgUrlArg;
+    var kaptchaImgDiv = document.getElementById("kaptchaImgDiv");
+    kaptchaImgDiv.innerHTML = "<img src='../tenant-register/images/ajax-loader.gif' alt='busy'/>";
+    setTimeout("showKaptchaTimely()", 4000);
+}
+
+function showKaptchaTimely() {
+    var kaptchaImgDiv = document.getElementById("kaptchaImgDiv");
+    kaptchaImgDiv.innerHTML = "<img src='" + kaptchaImgUrl + "' alt='If you can not see the captcha " +
+                              "image please refresh the page or click the link again.'/>";
+}
+
+function activateSubmit(fld) {
+    var submitButton = document.getElementById('submit-button');
+    submitButton.disabled = !fld;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/78c256c0/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/select_domain.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/select_domain.js b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/select_domain.js
new file mode 100644
index 0000000..592e308
--- /dev/null
+++ b/components/org.apache.stratos.register.ui/src/main/resources/web/tenant-register/js/select_domain.js
@@ -0,0 +1,75 @@
+function checkDomainAvailability(isPublicCloud) {
+    var domain = document.getElementById('domain');
+
+    var reason = validateEmpty(domain, "Domain");
+    if (reason == "") {
+        reason += checkDomain(domain, isPublicCloud);
+    }
+
+    if(reason != "") {
+        CARBON.showWarningDialog(reason);
+        return false;
+    }
+
+    var busyCheck = document.getElementById("busyCheck");
+    busyCheck.innerHTML = "<img src=\"images/ajax-loader.gif\"/>";
+    
+    var domain_confirmation_div = document.getElementById("domain-confirmation-msg");
+    
+    new Ajax.Request('../tenant-register/domain_availability_ajaxprocessor.jsp',
+    {
+        method:'post',
+        parameters: {domain: domain.value},
+
+        onSuccess: function(transport) {
+            busyCheck.innerHTML = "";
+            var returnValue = transport.responseText;
+            if (returnValue.search(/----DomainAvailable----/) == -1) {
+                domain_confirmation_div.style.color = "#f00";
+                domain_confirmation_div.innerHTML = jsi18n["domain.unavailable"]; 
+                result = false;
+            } else {
+                domain_confirmation_div.style.color = "#058000";
+                domain_confirmation_div.innerHTML = jsi18n["domain.available"];
+                result = true;
+            }
+        },
+
+        onFailure: function(transport){
+            busyCheck.innerHTML = "";
+        }
+    });
+}
+
+function clearDomainConfirmationMsg() {
+    var domain_confirmation_div = document.getElementById("domain-confirmation-msg");
+    domain_confirmation_div.innerHTML = "";
+}
+
+
+function checkDomain(fld, isPublicCloudSetup)
+{
+    var error = "";
+    var domain = fld.value;
+    var lastIndexOfDot = domain.lastIndexOf(".");
+    var indexOfDot = domain.indexOf(".");
+    var extension = domain.substring(lastIndexOfDot, domain.length);
+
+    var illegalChars = /([^a-zA-Z0-9\._\-])/; // allow only letters and numbers . - _and period
+    if (extension.indexOf("-trial") >= 0 || extension.indexOf("-unverified") >= 0) {
+        // we are not allowing to create a domain with -trial or -unverified is in the extension
+        error = "The domain name you entered is not valid. Please enter a valid domain name.";
+    }
+    else if (isPublicCloudSetup && (lastIndexOfDot <= 0)) {
+        error = "Invalid domain: " + domain + ". You should have an extension to your domain.";
+    }
+    else if (indexOfDot == 0) {
+        error = "Invalid domain, starting with '.'";
+    }
+    else if (illegalChars.test(fld.value)) {
+        error = "The domain only allows letters, numbers, '.', '-' and '_'. <br />";
+    } else {
+        fld.style.background = 'White';
+    }
+    return error;
+}