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/08 19:33:31 UTC

[3/7] Tenat-mgt refactoring

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
new file mode 100644
index 0000000..730d777
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/domain_availability_ajaxprocessor.jsp
@@ -0,0 +1,50 @@
+<!--
+ ~ 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.
+ -->
+<%@ 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>.
+<%
+}
+
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
new file mode 100644
index 0000000..fe7a6f6
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/get_package_info_ajaxprocessor.jsp
@@ -0,0 +1,39 @@
+<%--
+~ 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.
+--%>
+<%@ 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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/ajax-loader.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/ajax-loader.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/ajax-loader.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/body-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/body-bg.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/body-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/button-back.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/button-back.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/button-back.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/content-back-left.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/content-back-left.jpg b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/content-back-left.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/content-back.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/content-back.jpg b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/content-back.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/create-org-button.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/create-org-button.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/create-org-button.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-01-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-01-icon.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-01-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-02-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-02-icon.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-02-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-03-icon.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-03-icon.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/feature-03-icon.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/features-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/features-bg.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/features-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/footer.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/footer.jpg b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/footer.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/forum.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/forum.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/forum.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/header.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/header.jpg b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/header.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/help.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/help.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/help.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/images.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/images.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/images.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/issue-tracker.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/issue-tracker.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/issue-tracker.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/logo.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/logo.jpg b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/logo.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/mailing-list.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/mailing-list.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/mailing-list.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/page-back.jpg
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/page-back.jpg b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/page-back.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/people.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/people.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/people.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/services.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/services.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/services.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/signup-new-org.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/signup-new-org.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/signup-new-org.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/thememgt.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/thememgt.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/thememgt.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/user-guide.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/user-guide.gif b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/images/user-guide.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
new file mode 100755
index 0000000..d827f7c
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/init_payment_ajaxprocessor.jsp
@@ -0,0 +1,101 @@
+<!--
+ ~ 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.
+ -->
+<%@ 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.wso2.carbon.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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/js/register_config.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/js/register_config.js b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/js/register_config.js
new file mode 100644
index 0000000..fdcd24e
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/js/select_domain.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/js/select_domain.js b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/js/select_domain.js
new file mode 100644
index 0000000..592e308
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/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;
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_domain.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_domain.jsp b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_domain.jsp
new file mode 100644
index 0000000..9adfe7f
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_domain.jsp
@@ -0,0 +1,389 @@
+<!--
+~ 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.
+-->
+<%@ page import="org.wso2.carbon.stratos.common.constants.StratosConstants" %>
+<%@ page import="org.wso2.carbon.stratos.common.util.CommonUtil" %>
+<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
+<%@ page import="org.wso2.carbon.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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_usage_plan.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_usage_plan.jsp b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_usage_plan.jsp
new file mode 100644
index 0000000..3425d00
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/select_usage_plan.jsp
@@ -0,0 +1,279 @@
+<!--
+~ 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.
+-->
+<%@ page import="org.wso2.carbon.stratos.common.constants.StratosConstants" %>
+<%@ page import="org.wso2.carbon.stratos.common.util.CommonUtil" %>
+<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
+<%@ page import="org.wso2.carbon.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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
new file mode 100644
index 0000000..e6059f1
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/submit_tenant_ajaxprocessor.jsp
@@ -0,0 +1,66 @@
+<!--
+ ~ 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.
+ -->
+<%@ page import="org.wso2.carbon.register.ui.utils.TenantConfigUtil" %>
+<%@ page import="org.wso2.carbon.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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/success_register.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/success_register.jsp b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/success_register.jsp
new file mode 100644
index 0000000..dc60f1b
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.0/src/main/resources/web/tenant-register/success_register.jsp
@@ -0,0 +1,77 @@
+<!--
+~ 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.
+-->
+
+<%@ 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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.1/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.1/pom.xml b/components/org.apache.stratos.tenant.registration.ui/2.1.1/pom.xml
new file mode 100644
index 0000000..b7e3948
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.1/pom.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+# Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# Licensed 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>2.0.0</version>
+<relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.stratos.register.ui</artifactId>
+	<version>2.1.1</version>
+    <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.wso2.carbon.tenant.register.stub.*; version=4.1.0,
+                            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.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.stratos.common</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.tenant.register.stub</artifactId>
+	    <version>4.1.0</version>
+        </dependency>
+         <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.stratos.common.stub</artifactId>
+	    <version>4.1.0</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/8c3796dc/components/org.apache.stratos.tenant.registration.ui/2.1.1/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.tenant.registration.ui/2.1.1/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java b/components/org.apache.stratos.tenant.registration.ui/2.1.1/src/main/java/org/apache/stratos/register/ui/clients/PackageInfoServiceClient.java
new file mode 100644
index 0000000..8cf6734
--- /dev/null
+++ b/components/org.apache.stratos.tenant.registration.ui/2.1.1/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.wso2.carbon.stratos.common.packages.stub.PackageInfoServiceStub;
+import org.wso2.carbon.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);
+        }
+
+    }
+}