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

[1/3] applying 0001-Refactor-redirector-module.patch

Updated Branches:
  refs/heads/master 30fae32ce -> a5799ea86


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/pom.xml b/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/pom.xml
deleted file mode 100644
index b3689ef..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/pom.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?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.wso2.carbon</groupId>
-        <artifactId>redirector-parent</artifactId>
-        <version>2.1.0</version>
-<relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>org.wso2.carbon.redirector.servlet.ui</artifactId>
-    <packaging>bundle</packaging>
-    <name>WSO2 Stratos - Tenant Specific URL redirector UI component</name>
-
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-            <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>
-                        <Private-Package>
-                            org.wso2.carbon.redirector.servlet.ui.*,
-                            org.wso2.carbon.redirector.servlet.ui.internal.*,
-                            org.wso2.carbon.redirector.servlet.ui.clients.*,
-                            org.wso2.carbon.redirector.servlet.ui.util.*,
-                        </Private-Package>
-                        <Import-Package>
-			    org.wso2.carbon.redirector.servlet.stub.*; version="${carbon.platform.package.import.version.range}",
-                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
-                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
-                            org.apache.lucene.*,
-                            *;resolution:=optional
-                        </Import-Package>
-                        <DynamicImport-Package>*</DynamicImport-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-
-        </plugins>
-    </build>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.equinox</groupId>
-            <artifactId>javax.servlet</artifactId>
-            <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>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.ui</artifactId>
-            <version>${carbon.platform.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.stratos.common</artifactId>
-        </dependency>
-	<dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.redirector.servlet.stub</artifactId>
-            <version>${carbon.platform.version}</version>
-        </dependency>
-
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/clients/RedirectorServletServiceClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/clients/RedirectorServletServiceClient.java b/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/clients/RedirectorServletServiceClient.java
deleted file mode 100644
index 1093d32..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/clients/RedirectorServletServiceClient.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *  Copyright (c) 2005-2008, 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.
- *
- */
-package org.wso2.carbon.redirector.servlet.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.redirector.servlet.stub.RedirectorServletServiceStub;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.ui.CarbonUIUtil;
-import org.wso2.carbon.utils.ServerConstants;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpSession;
-
-public class RedirectorServletServiceClient {
-     private static final Log log = LogFactory.getLog(RedirectorServletServiceClient.class);
-
-    private RedirectorServletServiceStub stub;
-    private String epr;
-
-    public RedirectorServletServiceClient(
-            String cookie, String backendServerURL, ConfigurationContext configContext)
-            throws RegistryException {
-
-        epr = backendServerURL + "RedirectorServletService";
-
-        try {
-            stub = new RedirectorServletServiceStub(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 RedirectorServletServiceClient(ServletContext context, HttpSession session)
-            throws RegistryException {
-
-        String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
-        String backendServerURL = CarbonUIUtil.getServerURL(context, session);
-        ConfigurationContext configContext = (ConfigurationContext) context.
-                getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
-        epr = backendServerURL + "RedirectorServletService";
-
-        try {
-            stub = new RedirectorServletServiceStub(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 validateTenant(String tenantDomain) throws Exception {
-        return stub.validateTenant(tenantDomain);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/filters/AllPagesFilter.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/filters/AllPagesFilter.java b/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/filters/AllPagesFilter.java
deleted file mode 100644
index 5cd9858..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/filters/AllPagesFilter.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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.
- */
-package org.wso2.carbon.redirector.servlet.ui.filters;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
-import org.wso2.carbon.stratos.common.constants.StratosConstants;
-import org.wso2.carbon.redirector.servlet.ui.clients.RedirectorServletServiceClient;
-
-import javax.servlet.*;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-public class AllPagesFilter implements Filter {
-    private static final Log log = LogFactory.getLog(AllPagesFilter.class);
-    private static Map<String, Boolean> tenantExistMap = new HashMap<String, Boolean>();
-
-    ServletContext context;
-
-    public void init(FilterConfig filterConfig) throws ServletException {
-        context = filterConfig.getServletContext();
-    }
-
-    public void doFilter(ServletRequest servletRequest,
-                         ServletResponse servletResponse, FilterChain filterChain) throws
-            IOException, ServletException {
-        if (!(servletRequest instanceof HttpServletRequest)) {
-            // no filtering
-            return;
-        }
-        HttpServletRequest request = (HttpServletRequest) servletRequest;
-        String requestedURI = request.getRequestURI();
-
-        String contextPath = request.getContextPath();
-        if (contextPath == null || ("/").equals(contextPath)) {
-        	contextPath = "";
-        }
-        
-        StringTokenizer tokenizer = new StringTokenizer(requestedURI.substring(contextPath.length() + 1), "/");
-        String[] firstUriTokens = new String[2];
-        int i = 0;
-        while (tokenizer.hasMoreElements()) {
-            firstUriTokens[i] = tokenizer.nextToken();
-            i++;
-            if (i > 1) {
-                break;
-            }
-        }
-        if (i > 1 && firstUriTokens[0].equals("t")) {
-            if (requestedURI.startsWith("//")) {
-                requestedURI = requestedURI.replaceFirst("//", "/");
-            }
-            String path = requestedURI.substring(contextPath.length() + firstUriTokens[0].length() +
-                    firstUriTokens[1].length() + 2);
-
-            // need to validate the tenant exists
-            String tenantDomain = firstUriTokens[1];
-            boolean tenantExists = true;
-            boolean tenantActive = true;
-
-            if (tenantExistMap.get(tenantDomain) == null) {
-                // we have to call the service :(
-                RedirectorServletServiceClient client;
-                try {
-                    client = new RedirectorServletServiceClient(context, request.getSession());
-                } catch (Exception e) {
-                    String msg = "Error in constructing RedirectorServletServiceClient.";
-                    log.error(msg, e);
-                    throw new ServletException(msg, e);
-                }
-
-                try {
-                    String status = client.validateTenant(tenantDomain);
-                    tenantExists = !StratosConstants.INVALID_TENANT.equals(status);
-                    if (tenantExists && StratosConstants.ACTIVE_TENANT.equals(status)) {
-                        //tenantExists = true;
-                        tenantActive = true;
-                    }
-                } catch (Exception e) {
-                    String msg = "Error in checking the existing of the tenant domain: " +
-                            tenantDomain + ".";
-                    log.error(msg, e);
-                    throw new ServletException(msg, e);
-                }
-            }
-            // we have some backup stuff, if the tenant doesn't exists
-            if (tenantExists) {
-                if (tenantActive) {
-                    // we put this to hash only if the original tenant domain exist
-                    tenantExistMap.put(tenantDomain, true);
-                } else {
-                    String errorPage = contextPath +
-                            "/carbon/admin/error.jsp?The Requested tenant domain: " +
-                            tenantDomain + " is inactive.";
-                    RequestDispatcher requestDispatcher =
-                            request.getRequestDispatcher(errorPage);
-                    requestDispatcher.forward(request, servletResponse);
-                    return;
-                }
-            } else {
-                String errorPage = contextPath +
-                        "/carbon/admin/error.jsp?The Requested tenant domain: " +
-                        tenantDomain + " doesn't exist.";
-                RequestDispatcher requestDispatcher =
-                        request.getRequestDispatcher(errorPage);
-                requestDispatcher.forward(request, servletResponse);
-                return;
-            }
-            request.setAttribute(MultitenantConstants.TENANT_DOMAIN, tenantDomain);
-//            if (path.indexOf("admin/login.jsp") >= 0) {
-//                // we are going to apply the login.jsp filter + tenant specif filter both in here
-//                path = path.replaceAll("admin/login.jsp",
-//                        "tenant-login/login_ajaxprocessor.jsp");
-//                request.setAttribute(StratosConstants.TENANT_SPECIFIC_URL_RESOLVED, "1");
-//            }
-            if (path.indexOf("/admin/index.jsp") >= 0) {
-                // we are going to apply the login.jsp filter + tenant specif filter both in here
-                path = path.replaceAll("/admin/index.jsp", "/tenant-dashboard/index.jsp");
-                request.setAttribute(StratosConstants.TENANT_SPECIFIC_URL_RESOLVED, "1");
-            }
-            if (path.indexOf("admin/docs/userguide.html") >= 0) {
-                // we are going to apply the dasbhoard docs.jsp filter +
-                // tenant specif filter both in here
-                path = path.replaceAll("admin/docs/userguide.html",
-                        "tenant-dashboard/docs/userguide.html");
-                request.setAttribute(StratosConstants.TENANT_SPECIFIC_URL_RESOLVED, "1");
-            }
-            if ("".equals(path) || "/".equals(path) || "/carbon".equals(path) ||
-                    "/carbon/".equals(path) || "/carbon/admin".equals(path) ||
-                    "/carbon/admin/".equals(path)) {
-                // we have to redirect the root to the login page directly
-                path = contextPath + "/carbon/admin/login.jsp";             
-            	((HttpServletResponse) servletResponse).sendRedirect(path);
-                return;
-            }
-            RequestDispatcher requestDispatcher =
-                    request.getRequestDispatcher(path);            
-            requestDispatcher.forward(request, servletResponse);
-            return;
-        }
-    }
-
-    public void destroy() {
-        // nothing to destroy
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/internal/RedirectorServletUIComponent.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/internal/RedirectorServletUIComponent.java b/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/internal/RedirectorServletUIComponent.java
deleted file mode 100644
index d2f0225..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/internal/RedirectorServletUIComponent.java
+++ /dev/null
@@ -1,44 +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.
-*/
-package org.wso2.carbon.redirector.servlet.ui.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.redirector.servlet.ui.util.Util;
-
-/**
- * @scr.component name="org.wso2.carbon.redirector.servlet.ui"
- * immediate="true"
- */
-public class RedirectorServletUIComponent {
-     private static Log log = LogFactory.getLog(RedirectorServletUIComponent.class);
-
-    protected void activate(ComponentContext context) {
-        try {
-            Util.domainRegisterServlet(context.getBundleContext());
-            log.debug("******* Multitenancy Redirector Servlet UI bundle is activated ******* ");
-        } catch (Exception e) {
-            log.error("******* Multitenancy Redirector Servlet UI bundle failed activating ****", e);
-        }
-    }
-
-    protected void deactivate(ComponentContext context) {
-        log.debug("******* Multitenancy Redirector Servlet UI bundle is deactivated ******* ");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/util/Util.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/util/Util.java b/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/util/Util.java
deleted file mode 100644
index 0180311..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/ui/util/Util.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-package org.wso2.carbon.redirector.servlet.ui.util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.wso2.carbon.redirector.servlet.ui.filters.AllPagesFilter;
-import org.wso2.carbon.utils.CarbonUtils;
-import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
-
-import javax.servlet.Filter;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-public class Util {
-
-    private static final Log log = LogFactory.getLog(Util.class);
-
-    private static ServiceRegistration redirectorServiceRegistration;
-
-    public static void domainRegisterServlet(BundleContext bundleContext) throws Exception {
-        if (!CarbonUtils.isRemoteRegistry()) {
-            HttpServlet reirectorServlet = new HttpServlet() {
-                // the redirector filter will forward the request before this servlet is hit
-                protected void doGet(HttpServletRequest request, HttpServletResponse response)
-                        throws ServletException, IOException {
-                }
-            };
-
-            Filter redirectorFilter = new AllPagesFilter();
-
-            Dictionary redirectorServletAttributes = new Hashtable(2);
-            Dictionary redirectorParams = new Hashtable(2);
-            redirectorParams.put("url-pattern", "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX);
-            redirectorParams.put("associated-filter", redirectorFilter);
-            redirectorParams.put("servlet-attributes", redirectorServletAttributes);
-
-            redirectorServiceRegistration = bundleContext.registerService(Servlet.class.getName(),
-                    reirectorServlet, redirectorParams);
-
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/resources/RedirectorServletService.wsdl
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/resources/RedirectorServletService.wsdl b/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/resources/RedirectorServletService.wsdl
deleted file mode 100644
index 374ac3b..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet.ui/2.1.0/src/main/resources/RedirectorServletService.wsdl
+++ /dev/null
@@ -1,102 +0,0 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.servlet.redirector.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services.servlet.redirector.carbon.wso2.org">
-    <wsdl:documentation>RedirectorServletService</wsdl:documentation>
-    <wsdl:types>
-        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.servlet.redirector.carbon.wso2.org">
-            <xs:element name="validateTenantException">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="validateTenantException" nillable="true" type="ns:Exception" />
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:complexType name="Exception">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
-                </xs:sequence>
-            </xs:complexType>
-            <xs:element name="validateTenant">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string" />
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="validateTenantResponse">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-        </xs:schema>
-    </wsdl:types>
-    <wsdl:message name="validateTenantRequest">
-        <wsdl:part name="parameters" element="ns:validateTenant" />
-    </wsdl:message>
-    <wsdl:message name="validateTenantResponse">
-        <wsdl:part name="parameters" element="ns:validateTenantResponse" />
-    </wsdl:message>
-    <wsdl:message name="validateTenantException">
-        <wsdl:part name="parameters" element="ns:validateTenantException" />
-    </wsdl:message>
-    <wsdl:portType name="RedirectorServletServicePortType">
-        <wsdl:operation name="validateTenant">
-            <wsdl:input message="ns:validateTenantRequest" wsaw:Action="urn:validateTenant" />
-            <wsdl:output message="ns:validateTenantResponse" wsaw:Action="urn:validateTenantResponse" />
-            <wsdl:fault message="ns:validateTenantException" name="validateTenantException" wsaw:Action="urn:validateTenantvalidateTenantException" />
-        </wsdl:operation>
-    </wsdl:portType>
-    <wsdl:binding name="RedirectorServletServiceSoap11Binding" type="ns:RedirectorServletServicePortType">
-        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
-        <wsdl:operation name="validateTenant">
-            <soap:operation soapAction="urn:validateTenant" style="document" />
-            <wsdl:input>
-                <soap:body use="literal" />
-            </wsdl:input>
-            <wsdl:output>
-                <soap:body use="literal" />
-            </wsdl:output>
-            <wsdl:fault name="validateTenantException">
-                <soap:fault use="literal" name="validateTenantException" />
-            </wsdl:fault>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:binding name="RedirectorServletServiceSoap12Binding" type="ns:RedirectorServletServicePortType">
-        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
-        <wsdl:operation name="validateTenant">
-            <soap12:operation soapAction="urn:validateTenant" style="document" />
-            <wsdl:input>
-                <soap12:body use="literal" />
-            </wsdl:input>
-            <wsdl:output>
-                <soap12:body use="literal" />
-            </wsdl:output>
-            <wsdl:fault name="validateTenantException">
-                <soap12:fault use="literal" name="validateTenantException" />
-            </wsdl:fault>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:binding name="RedirectorServletServiceHttpBinding" type="ns:RedirectorServletServicePortType">
-        <http:binding verb="POST" />
-        <wsdl:operation name="validateTenant">
-            <http:operation location="validateTenant" />
-            <wsdl:input>
-                <mime:content type="text/xml" part="parameters" />
-            </wsdl:input>
-            <wsdl:output>
-                <mime:content type="text/xml" part="parameters" />
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:service name="RedirectorServletService">
-        <wsdl:port name="RedirectorServletServiceHttpsSoap11Endpoint" binding="ns:RedirectorServletServiceSoap11Binding">
-            <soap:address location="https://10.100.0.161:9443/services/RedirectorServletService.RedirectorServletServiceHttpsSoap11Endpoint/" />
-        </wsdl:port>
-        <wsdl:port name="RedirectorServletServiceHttpsSoap12Endpoint" binding="ns:RedirectorServletServiceSoap12Binding">
-            <soap12:address location="https://10.100.0.161:9443/services/RedirectorServletService.RedirectorServletServiceHttpsSoap12Endpoint/" />
-        </wsdl:port>
-        <wsdl:port name="RedirectorServletServiceHttpsEndpoint" binding="ns:RedirectorServletServiceHttpBinding">
-            <http:address location="https://10.100.0.161:9443/services/RedirectorServletService.RedirectorServletServiceHttpsEndpoint/" />
-        </wsdl:port>
-    </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/pom.xml b/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/pom.xml
deleted file mode 100644
index 55127df..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/pom.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<!--
-# 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.wso2.carbon</groupId>
-        <artifactId>redirector-parent</artifactId>
-        <version>2.1.0</version>
-<relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>org.wso2.carbon.redirector.servlet</artifactId>
-    <packaging>bundle</packaging>
-    <name>WSO2 Stratos - Tenant Specific URL redirector</name>
-
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-            <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>
-                        <Private-Package>
-                            org.wso2.carbon.redirector.servlet.services.*,
-                            org.wso2.carbon.redirector.servlet.internal.*,
-                        </Private-Package>
-                        <Export-Package>
-                            org.wso2.carbon.redirector.servlet.util.*,
-                        </Export-Package>
-                        <Import-Package>
-                            org.wso2.carbon.registry.core.*;version=1.0.1,
-                            !javax.xml.namespace,
-                            javax.xml.namespace; version=0.0.0,
-                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
-                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
-                            org.apache.axiom.*; version="${axiom.osgi.version.range}",
-                            *;resolution:=optional
-                        </Import-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.axis2.wso2</groupId>
-            <artifactId>axis2</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.registry.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.stratos.common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.activation</artifactId>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/internal/RedirectorServletServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/internal/RedirectorServletServiceComponent.java b/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/internal/RedirectorServletServiceComponent.java
deleted file mode 100644
index c022f13..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/internal/RedirectorServletServiceComponent.java
+++ /dev/null
@@ -1,80 +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.
-*/
-package org.wso2.carbon.redirector.servlet.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.framework.BundleContext;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.activation.service.ActivationService;
-import org.wso2.carbon.redirector.servlet.util.Util;
-
-/**
- * @scr.component name="org.wso2.carbon.redirector.servlet"
- * immediate="true"
- * @scr.reference name="registry.service"
- * interface="org.wso2.carbon.registry.core.service.RegistryService" cardinality="1..1"
- * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService"
- * @scr.reference name="user.realmservice.default" interface="org.wso2.carbon.user.core.service.RealmService"
- * cardinality="1..1" policy="dynamic" bind="setRealmService"
- * unbind="unsetRealmService"
- * @scr.reference name="activation.service" interface="org.wso2.carbon.activation.service.ActivationService"
- * cardinality="0..1" policy="dynamic" bind="setActivationService"
- * unbind="unsetActivationService"
- */
-public class RedirectorServletServiceComponent {
-     private static Log log = LogFactory.getLog(RedirectorServletServiceComponent.class);
-
-    protected void activate(ComponentContext context) {
-        try {
-            log.debug("******* Multitenancy Redirector Servlet admin service bundle is activated ******* ");
-        } catch (Exception e) {
-            log.error("******* Multitenancy Redirector Servlet admin service bundle failed activating ****", e);
-        }
-    }
-
-    protected void deactivate(ComponentContext context) {
-        log.debug("******* Multitenancy Redirector Servlet admin service bundle is deactivated ******* ");
-    }
-
-    protected void setRegistryService(RegistryService registryService) {
-        Util.setRegistryService(registryService);
-    }
-
-    protected void unsetRegistryService(RegistryService registryService) {
-        Util.setRegistryService(null);
-    }
-
-    protected void setRealmService(RealmService realmService) {
-        Util.setRealmService(realmService);
-    }
-
-    protected void unsetRealmService(RealmService realmService) {
-        Util.setRealmService(null);
-    }
-
-    protected void setActivationService(ActivationService activationService) {
-        Util.setActivationService(activationService);
-    }
-
-    protected void unsetActivationService(ActivationService activationService) {
-        Util.setActivationService(null);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/services/RedirectorServletService.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/services/RedirectorServletService.java b/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/services/RedirectorServletService.java
deleted file mode 100644
index fd53e92..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/services/RedirectorServletService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *  Copyright (c) 2005-2008, 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.
- *
- */
-package org.wso2.carbon.redirector.servlet.services;
-
-import org.wso2.carbon.user.core.tenant.TenantManager;
-import org.wso2.carbon.stratos.common.constants.StratosConstants;
-import org.wso2.carbon.redirector.servlet.util.Util;
-
-public class RedirectorServletService {
-    public String validateTenant(String tenantDomain) throws Exception {
-        TenantManager tenantManager = Util.getTenantManager();
-        int tenantId = tenantManager.getTenantId(tenantDomain);
-        if (tenantId <= 0) {
-            return StratosConstants.INVALID_TENANT;
-        } else if (Util.getActivationService() != null &&
-                !Util.getActivationService().isActive(tenantId)) {
-            return StratosConstants.INACTIVE_TENANT;
-        }
-        return StratosConstants.ACTIVE_TENANT;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/util/Util.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/util/Util.java b/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/util/Util.java
deleted file mode 100644
index 5931679..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/java/org/wso2/carbon/redirector/servlet/util/Util.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-package org.wso2.carbon.redirector.servlet.util;
-
-import org.wso2.carbon.registry.core.session.UserRegistry;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.apache.axis2.context.MessageContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.registry.core.RegistryConstants;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.user.core.tenant.TenantManager;
-import org.wso2.carbon.user.api.RealmConfiguration;
-import org.wso2.carbon.utils.CarbonUtils;
-import org.wso2.carbon.CarbonConstants;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.wso2.carbon.activation.service.ActivationService;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.*;
-import java.util.*;
-
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.*;
-
-public class Util {
-
-    private static final Log log = LogFactory.getLog(Util.class);
-
-    private static RegistryService registryService;
-    private static RealmService realmService;
-    private static ServiceRegistration redirectorServiceRegistration = null;
-    private static ActivationService activationService = null;
-
-    public static synchronized void setRegistryService(RegistryService service) {
-        if (registryService == null) {
-            registryService = service;
-        }
-    }
-    public static RegistryService getRegistryService() {
-        return registryService;
-    }
-
-    public static synchronized void setActivationService(ActivationService service) {
-        if (activationService == null) {
-            activationService = service;
-        }
-    }
-    public static ActivationService getActivationService() {
-        return activationService;
-    }
-
-    public static synchronized void setRealmService(RealmService service) {
-        if (realmService == null) {
-            realmService = service;
-        }
-    }
-
-    public static TenantManager getTenantManager() {
-        return realmService.getTenantManager();
-    }
-
-    public static RealmConfiguration getBootstrapRealmConfiguration() {
-        return realmService.getBootstrapRealmConfiguration();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/resources/META-INF/services.xml
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/resources/META-INF/services.xml b/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/resources/META-INF/services.xml
deleted file mode 100644
index f282495..0000000
--- a/components/stratos/redirector/org.wso2.carbon.redirector.servlet/2.1.0/src/main/resources/META-INF/services.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- !
- ! Copyright 2006 The Apache Software Foundation.
- !
- ! 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.
- !-->
-<serviceGroup>
-    <service name="RedirectorServletService" scope="transportsession">
-        <transports>
-            <transport>https</transport>
-        </transports>
-        <parameter name="ServiceClass" locked="false">
-            org.wso2.carbon.redirector.servlet.services.RedirectorServletService
-        </parameter>
-    </service>
-    <parameter name="hiddenService" locked="true">true</parameter>
-</serviceGroup>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/pom.xml b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/pom.xml
deleted file mode 100644
index f0086df..0000000
--- a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.wso2.carbon</groupId>
-        <artifactId>redirector-parent</artifactId>
-        <version>2.1.0</version>
-<relativePath>../../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>org.wso2.carbon.sso.redirector.ui</artifactId>
-    <version>2.1.0</version>
-    <packaging>bundle</packaging>
-    <name>WSO2 Stratos - SSO redirector UI component</name>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-            <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>
-                        <Private-Package>
-                            org.wso2.carbon.sso.redirector.ui.internal.*,
-                        </Private-Package>
-                        <Import-Package>
-                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
-                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
-                            org.apache.lucene.*,
-                            *;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.ui</artifactId>
-    	    <version>4.1.0</version>
-        </dependency>
-	<dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.identity.authenticator.saml2.sso.common</artifactId>
-    	    <version>4.1.0</version>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/RedirectorJSPFilter.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/RedirectorJSPFilter.java b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/RedirectorJSPFilter.java
deleted file mode 100644
index f4c8c14..0000000
--- a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/RedirectorJSPFilter.java
+++ /dev/null
@@ -1,59 +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.
-*/
-
-package org.wso2.carbon.sso.redirector.ui.internal;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-
-/**
- * This class acts as a servlet filter which forwads the requests coming for sso-acs/redirect_ajaxprocessor.jsp
- * to stratos-auth/redirect_ajaxprocessor.jsp
- */
-public class RedirectorJSPFilter implements Filter {
-
-    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
-                         FilterChain filterChain) throws IOException, ServletException {
-        if (!(servletRequest instanceof HttpServletRequest)) {
-            return;
-        }
-        String url = ((HttpServletRequest) servletRequest).getRequestURI();
-        if(url.contains("//")){
-            url = url.replace("//", "/");
-        }
-        url = url.replace("sso-acs/redirect_ajaxprocessor.jsp", "stratos-auth/redirect_ajaxprocessor.jsp");
-        RequestDispatcher requestDispatcher =
-                servletRequest.getRequestDispatcher(url);
-        requestDispatcher.forward(servletRequest, servletResponse);
-    }
-
-    public void init(FilterConfig filterConfig) throws ServletException {
-        // not required to implement
-    }
-
-    public void destroy() {
-        // not required to implement
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/SSORedirectorServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/SSORedirectorServiceComponent.java b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/SSORedirectorServiceComponent.java
deleted file mode 100644
index 5c7d670..0000000
--- a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/java/org/wso2/carbon/sso/redirector/ui/internal/SSORedirectorServiceComponent.java
+++ /dev/null
@@ -1,65 +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.
-*/
-
-package org.wso2.carbon.sso.redirector.ui.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.service.component.ComponentContext;
-
-import javax.servlet.Filter;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-/**
- * @scr.component name="org.wso2.carbon.sso.redirector.ui"
- * immediate="true"
- */
-public class SSORedirectorServiceComponent {
-    private static Log log = LogFactory.getLog(SSORedirectorServiceComponent.class);
-
-    protected void activate(ComponentContext ctxt) {
-
-        // register a servlet filter for SSO redirector page
-        HttpServlet redirectJSPRedirectorServlet = new HttpServlet() {
-            protected void doGet(HttpServletRequest request, HttpServletResponse response)
-                    throws ServletException, IOException {
-            }
-        };
-
-        Filter redirectPageFilter = new RedirectorJSPFilter();
-        Dictionary redirectorPageFilterAttrs = new Hashtable(2);
-        Dictionary redirectorPageFilterParams = new Hashtable(2);
-        redirectorPageFilterParams.put("url-pattern", "/carbon/sso-acs/redirect_ajaxprocessor.jsp");
-        redirectorPageFilterParams.put("associated-filter", redirectPageFilter);
-        redirectorPageFilterParams.put("servlet-attributes", redirectorPageFilterAttrs);
-        ctxt.getBundleContext().registerService(Servlet.class.getName(), redirectJSPRedirectorServlet,
-                                                redirectorPageFilterParams);
-        log.debug("Stratos SSO Redirector bundle is activated..");
-    }
-
-    protected void deactivate(ComponentContext ctxt) {
-        log.debug("Stratos SSO Redirector bundle is deactivated..");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/org/wso2/stratos/sso/redirector/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/org/wso2/stratos/sso/redirector/ui/i18n/Resources.properties b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/org/wso2/stratos/sso/redirector/ui/i18n/Resources.properties
deleted file mode 100644
index d941d56..0000000
--- a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/org/wso2/stratos/sso/redirector/ui/i18n/Resources.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-saml.sso.menu=SAML SSO
-saml.sso=SAML 2.0 based Single Sign-On
-enter.password.to.signin=Please enter your credentials to sign in to WSO2 Identity Server SAML SSO
-username=Username
-password=Password
-login=Sign In
-sso.configuration=SAML SSO Configuration
-sp.issuer=Issuer
-sp.assertionConsumerURL=Assertion Consumer URL
-sp.certAlias=Certificate Alias
-saml.sso.service.providers.not.found=No SAML SSO Service Providers are found.
-saml.sso.add.service.provider=Add new Service Provider
-saml.sso.add=Add
-sp.enter.valid.endpoint.address=Please enter a valid URL for AssertionConsumerURL
-sp.enter.valid.issuer=Please enter a valid issuer
-sp.enter.valid.claimID=ClaimID field cannot be left empty
-sp.added.successfully=Service Provider Added Successfully
-error.adding.sp=Could not add Service Provider. You might be entering a duplicate Service Provider
-remove.message1=You are about to remove the trusted service provider
-remove.message2=. Do you want to proceed?
-error.removing.sp=Problem in removing the service provider
-select.subject.type=Select the value to be appeared as the subject
-select.subject.type.username=Use current username as the subject
-select.subject.type.claimid=Use a custom claim as the subject
-subject.type.claimid=Claim ID
-subject.type.namidformat=NameID Format
-logout.url=Custom Logout URL
-validate.signature=Enable Signature Validation in Authentication Requests and Logout Requests
-saml.sso.generated.key=Generated Key for Signing SAML2 based single sign-on
-saml.sso.download.pub.key=Download the public key of the generated key pair
-saml.sso.add.sp.to.genkey=Add atleast one service provider to generate a key pair
-login.fail.message=Login failed! Please recheck the username and password and try again.

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/css/stratos-loginpage.css
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/css/stratos-loginpage.css b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/css/stratos-loginpage.css
deleted file mode 100644
index fce87f7..0000000
--- a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/css/stratos-loginpage.css
+++ /dev/null
@@ -1,94 +0,0 @@
-body {
-background-image:url(../images/st-login-body-bg.gif);
-background-position:left top;
-background-repeat:repeat-x;
-font-family:"Calibri",Arial,Helvetica,san-serif;
-font-size:0.8em;
-margin:0;
-padding:0;
-}
-p {
-}
-td {
-}
-a:link {
-text-decoration:none;
-}
-a:visited {
-}
-a:hover {
-}
-a:active {
-}
-a img {
-border:0 none;
-}
-div#middle {
-background-color:#FFFFFF;
-margin:auto;
-width:961px;
-}
-div#header {
-background-image:url(../images/st-login-header-bg.gif);
-background-position:left top;
-background-repeat:no-repeat;
-height:87px;
-padding-top:94px;
-text-align:center;
-}
-div#content {
-background-image:url(../images/st-login-content-bg.gif);
-background-position:left top;
-background-repeat:no-repeat;
-padding-left:60px;
-padding-right:60px;
-padding-top:20px;
-}
-div#intro {
-padding-bottom:10px;
-text-align:center;
-}
-div#register {
-float:left;
-padding-top:85px;
-text-align:center;
-width:420px;
-}
-div#sign-in {
-border-left:1px solid #0499CC;
-float:left;
-padding:20px 30px 30px 50px;
-text-align:left;
-width:340px;
-}
-div#sign-in h2 {
-border-bottom:1px solid #78BDE8;
-font-size:130%;
-margin-bottom:10px;
-margin-top:0;
-padding-bottom:10px;
-padding-top:0;
-}
-div#sign-in table tr td {
-padding-bottom:5px;
-padding-right:7px;
-}
-div#sign-in table {
-border-bottom:1px solid #78BDE8;
-margin-bottom:7px;
-}
-div#footer {
-background-image:url(../images/st-login-footer-bg.gif);
-background-position:left top;
-background-repeat:no-repeat;
-margin-top:5px;
-padding-bottom:7px;
-padding-top:25px;
-text-align:center;
-}
-div.clear {
-clear:both;
-}
-#loginForm td label{
-    font-size:11px;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png
deleted file mode 100644
index eab6259..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png
deleted file mode 100644
index 994c861..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-sso-config.png
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-sso-config.png b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-sso-config.png
deleted file mode 100644
index 375e9ee..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/cloud-sso-config.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/delete.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/delete.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/delete.gif
deleted file mode 100644
index 471f55c..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/delete.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/import.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/import.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/import.gif
deleted file mode 100644
index c9fb1df..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/import.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/loading.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/loading.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/loading.gif
deleted file mode 100644
index 5b200ed..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/loading.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/logo.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/logo.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/logo.gif
deleted file mode 100644
index 837f813..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/logo.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/policy.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/policy.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/policy.gif
deleted file mode 100644
index f9c58f5..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/policy.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/powered.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/powered.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/powered.gif
deleted file mode 100644
index b8bc163..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/powered.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/register.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/register.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/register.gif
deleted file mode 100644
index f225e38..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/register.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/sso.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/sso.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/sso.gif
deleted file mode 100644
index 7f2e74a..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/sso.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif
deleted file mode 100644
index dc2c240..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif
deleted file mode 100644
index 9624125..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif
deleted file mode 100644
index dc317e5..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif
deleted file mode 100644
index bd228c9..0000000
Binary files a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp b/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp
deleted file mode 100644
index 66906d8..0000000
--- a/components/stratos/redirector/org.wso2.carbon.sso.redirector.ui/2.1.0/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp
+++ /dev/null
@@ -1,176 +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.
--->
-<%@page import="org.opensaml.saml2.core.AuthnRequest" %>
-<%@page import="org.opensaml.saml2.core.LogoutRequest" %>
-<%@ page
-        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.SAML2SSOAuthenticatorConstants" %>
-<%@ page import="org.wso2.carbon.identity.authenticator.saml2.sso.common.SSOSessionManager" %>
-<%@ page
-        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.builders.AuthenticationRequestBuilder" %>
-<%@ page
-        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.builders.LogoutRequestBuilder" %>
-<%@ page
-        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.Util" %>
-<%@ page import="org.wso2.carbon.registry.core.utils.UUIDGenerator" %>
-<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<html>
-<head>
-    <title>WSO2 Stratos Identity</title>
-    <style type="text/css" media="screen"><!--
-    body {
-        color: #111111;
-	font: 13px/27px Arial,sans-serif;
-        font-size-adjust: none;
-        font-style: normal;
-        font-variant: normal;
-    }
-
-    
-
-    .redirectForm {
-        display: inline;
-    }
-    .dots{
-	border:solid 1x #ccc;
-	width:10px;
-	height:10px;
-	float:left;
-	margin:5px;
-	-moz-border-radius: 4px;
-	border-radius: 4px;
-	-moz-box-shadow: 3px 3px 3px #888;
-	-webkit-box-shadow: 3px 3px 3px #888;
-	box-shadow: 3px 3px 3px #888;
-    }
-    .dots-pane{
-	width:150px;
-	margin:0px 10px;
-    }
-    .dot0{
-	background-color:#111;
-    }
-    .dot1{
-	background-color:#444;
-    }
-    .dot2{
-	background-color:#777;
-    }
-    .dot3{
-	background-color:#ddd;
-    }
-    .dot4{
-	background-color:#eee;
-    }
-    .dot5{
-	background-color:#fff;
-    }
-    .loading-text{
-	padding:10px;
-	font-weight:bold;
-	font-size:16px;
-    }
-    --></style>
-</head>
-<body>
-<%
-    String encodedReq = null;
-    String relayState = "";
-    String domain = null;
-    if (request.getParameter(SAML2SSOAuthenticatorConstants.LOG_OUT_REQ) != null) {
-        LogoutRequestBuilder logoutRequestBuilder = new LogoutRequestBuilder();
-        LogoutRequest logoutReq = logoutRequestBuilder.buildLogoutRequest((String) request.getAttribute(
-                SAML2SSOAuthenticatorConstants.LOGGED_IN_USER), SAML2SSOAuthenticatorConstants.LOGOUT_USER);
-        encodedReq = Util.encode(Util.marshall(logoutReq));
-        relayState = UUIDGenerator.generateUUID();
-    } else {
-        AuthenticationRequestBuilder authnReqGenerator = new AuthenticationRequestBuilder();
-        AuthnRequest authRequest = authnReqGenerator.buildAuthenticationRequest(null);
-        encodedReq = Util.encode(Util.marshall(authRequest));
-        relayState = UUIDGenerator.generateUUID();
-        domain = (String) request.getAttribute(MultitenantConstants.TENANT_DOMAIN);
-    }
-    // add the relay state to Session Manager
-    SSOSessionManager.addAuthnRequest(relayState);
-
-%>
-<div class="loading-text">Loading WSO2 StratosLive...</div>
-<div class="dots-pane" id="dotsContainer">
-    <div class="dots"></div>
-    <div class="dots"></div>
-    <div class="dots"></div>
-    <div class="dots"></div>
-    <div class="dots"></div>
-    <div class="dots"></div>
-</div>
-
-<script>
-    var t;
-    var timer_is_on = 0;
-    var j=0;
-    var dotsContainer = document.getElementById('dotsContainer');
-    var dots = dotsContainer.childNodes;
-    var divdots = new Array();
-    for(var i=0;i<dots.length;i++){
-	if(dots[i].nodeName == "DIV" ){
-	    divdots.push(dots[i]);
-	}
-    }
-    function animateStuff(){
-	for(var i=0;i<divdots.length;i++){
-	    var classNumber;
-	    if((i+j)<divdots.length){
-		classNumber = i + j;
-	    }else{
-		classNumber = i + j - divdots.length;
-	    }
-	    divdots[i].className = "dots dot"+classNumber;
-	    
-	}
-	if(j<=5){
-	    j++;
-	}else{
-	    j=0;
-	}
-	t = setTimeout(animateStuff,200);
-    }
-
-    if(!timer_is_on){
-	animateStuff();
-    }
-</script>
-
-
-		
-<form method="post" action="<%=Util.getIdentityProviderSSOServiceURL()%>" class="redirectForm">
-    <input type="hidden"
-              name="<%=SAML2SSOAuthenticatorConstants.HTTP_POST_PARAM_SAML2_AUTH_REQ%>"
-              value="<%= encodedReq %>"/>
-        <input type="hidden" name="RelayState" value="<%= relayState %>"/>
-        <input type="hidden" name="<%= MultitenantConstants.TENANT_DOMAIN %>"
-               value="<%= domain %>"/>
-        <input type="hidden" name="<%= MultitenantConstants.SSO_AUTH_SESSION_ID %>" value="<%= session.getId() %>"/>
-        
-</form>
-	
-<script type="text/javascript">
-	document.forms[0].submit();
-</script>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/stratos/redirector/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/redirector/pom.xml b/components/stratos/redirector/pom.xml
deleted file mode 100644
index ef0fa48..0000000
--- a/components/stratos/redirector/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (c) 2009-2010, 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.wso2.carbon</groupId>
-        <artifactId>stratos-components</artifactId>
-        <version>2.1.0</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>redirector-parent</artifactId>
-    <packaging>pom</packaging>
-    <name>WSO2 Stratos - Redirector Parent Module</name>
-    <description>WSO2 Stratos Redirector Parent Module</description>
-    <url>http://wso2.org</url>
-
-    <modules>
-        <module>org.wso2.carbon.redirector.servlet/2.1.0</module>
-        <module>org.wso2.carbon.redirector.servlet.ui/2.1.0</module>
-        <module>org.wso2.carbon.sso.redirector.ui/2.1.0</module>
-    </modules>
-
-</project>
-


[2/3] git commit: applying 0001-Refactor-redirector-module.patch

Posted by la...@apache.org.
applying 0001-Refactor-redirector-module.patch


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

Branch: refs/heads/master
Commit: 888ca4d53165be938f60bb4c276e3e220e89d2f3
Parents: fcb90b1
Author: Lakmal Warusawithana <la...@wso2.com>
Authored: Thu Jul 11 17:45:12 2013 +0530
Committer: Lakmal Warusawithana <la...@wso2.com>
Committed: Thu Jul 11 17:45:12 2013 +0530

----------------------------------------------------------------------
 .../pom.xml                                     | 110 ++++++++++++
 .../clients/RedirectorServletServiceClient.java |  90 ++++++++++
 .../servlet/ui/filters/AllPagesFilter.java      | 167 +++++++++++++++++
 .../internal/RedirectorServletUIComponent.java  |  45 +++++
 .../redirector/servlet/ui/util/Util.java        |  67 +++++++
 .../resources/RedirectorServletService.wsdl     | 102 +++++++++++
 .../pom.xml                                     | 101 +++++++++++
 .../RedirectorServletServiceComponent.java      |  80 +++++++++
 .../services/RedirectorServletService.java      |  37 ++++
 .../stratos/redirector/servlet/util/Util.java   |  73 ++++++++
 .../src/main/resources/META-INF/services.xml    |  30 ++++
 .../pom.xml                                     |  87 +++++++++
 .../ui/internal/RedirectorJSPFilter.java        |  60 +++++++
 .../internal/SSORedirectorServiceComponent.java |  66 +++++++
 .../sso/redirector/ui/i18n/Resources.properties |  32 ++++
 .../web/stratos-auth/css/stratos-loginpage.css  |  94 ++++++++++
 .../images/cloud-identity-sso-config-ok.png     | Bin 0 -> 38465 bytes
 .../images/cloud-identity-sso-config.png        | Bin 0 -> 32929 bytes
 .../stratos-auth/images/cloud-sso-config.png    | Bin 0 -> 29222 bytes
 .../web/stratos-auth/images/delete.gif          | Bin 0 -> 555 bytes
 .../web/stratos-auth/images/import.gif          | Bin 0 -> 1051 bytes
 .../web/stratos-auth/images/loading.gif         | Bin 0 -> 14367 bytes
 .../resources/web/stratos-auth/images/logo.gif  | Bin 0 -> 17603 bytes
 .../web/stratos-auth/images/policy.gif          | Bin 0 -> 1017 bytes
 .../web/stratos-auth/images/powered.gif         | Bin 0 -> 1773 bytes
 .../web/stratos-auth/images/register.gif        | Bin 0 -> 4099 bytes
 .../resources/web/stratos-auth/images/sso.gif   | Bin 0 -> 394 bytes
 .../stratos-auth/images/st-login-body-bg.gif    | Bin 0 -> 2215 bytes
 .../stratos-auth/images/st-login-content-bg.gif | Bin 0 -> 1060 bytes
 .../stratos-auth/images/st-login-footer-bg.gif  | Bin 0 -> 749 bytes
 .../stratos-auth/images/st-login-header-bg.gif  | Bin 0 -> 64503 bytes
 .../web/stratos-auth/redirect_ajaxprocessor.jsp | 177 +++++++++++++++++++
 .../2.1.0/pom.xml                               | 105 -----------
 .../clients/RedirectorServletServiceClient.java |  90 ----------
 .../servlet/ui/filters/AllPagesFilter.java      | 164 -----------------
 .../internal/RedirectorServletUIComponent.java  |  44 -----
 .../carbon/redirector/servlet/ui/util/Util.java |  64 -------
 .../resources/RedirectorServletService.wsdl     | 102 -----------
 .../2.1.0/pom.xml                               |  97 ----------
 .../RedirectorServletServiceComponent.java      |  80 ---------
 .../services/RedirectorServletService.java      |  37 ----
 .../carbon/redirector/servlet/util/Util.java    |  84 ---------
 .../src/main/resources/META-INF/services.xml    |  28 ---
 .../2.1.0/pom.xml                               |  85 ---------
 .../ui/internal/RedirectorJSPFilter.java        |  59 -------
 .../internal/SSORedirectorServiceComponent.java |  65 -------
 .../sso/redirector/ui/i18n/Resources.properties |  32 ----
 .../web/stratos-auth/css/stratos-loginpage.css  |  94 ----------
 .../images/cloud-identity-sso-config-ok.png     | Bin 38465 -> 0 bytes
 .../images/cloud-identity-sso-config.png        | Bin 32929 -> 0 bytes
 .../stratos-auth/images/cloud-sso-config.png    | Bin 29222 -> 0 bytes
 .../web/stratos-auth/images/delete.gif          | Bin 555 -> 0 bytes
 .../web/stratos-auth/images/import.gif          | Bin 1051 -> 0 bytes
 .../web/stratos-auth/images/loading.gif         | Bin 14367 -> 0 bytes
 .../resources/web/stratos-auth/images/logo.gif  | Bin 17603 -> 0 bytes
 .../web/stratos-auth/images/policy.gif          | Bin 1017 -> 0 bytes
 .../web/stratos-auth/images/powered.gif         | Bin 1773 -> 0 bytes
 .../web/stratos-auth/images/register.gif        | Bin 4099 -> 0 bytes
 .../resources/web/stratos-auth/images/sso.gif   | Bin 394 -> 0 bytes
 .../stratos-auth/images/st-login-body-bg.gif    | Bin 2215 -> 0 bytes
 .../stratos-auth/images/st-login-content-bg.gif | Bin 1060 -> 0 bytes
 .../stratos-auth/images/st-login-footer-bg.gif  | Bin 749 -> 0 bytes
 .../stratos-auth/images/st-login-header-bg.gif  | Bin 64503 -> 0 bytes
 .../web/stratos-auth/redirect_ajaxprocessor.jsp | 176 ------------------
 components/stratos/redirector/pom.xml           |  42 -----
 65 files changed, 1418 insertions(+), 1448 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet.ui/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet.ui/pom.xml b/components/org.apache.stratos.redirector.servlet.ui/pom.xml
new file mode 100644
index 0000000..aacddac
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet.ui/pom.xml
@@ -0,0 +1,110 @@
+<?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.redirector.servlet.ui</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Stratos - Tenant Specific URL redirector UI component</name>
+
+    <build>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <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>
+                        <Private-Package>
+                            org.apache.stratos.redirector.servlet.ui.*,
+                            org.apache.stratos.redirector.servlet.ui.internal.*,
+                            org.apache.stratos.redirector.servlet.ui.clients.*,
+                            org.apache.stratos.redirector.servlet.ui.util.*,
+                        </Private-Package>
+                        <Import-Package>
+			    org.apache.stratos.redirector.servlet.stub.*; version="${carbon.platform.package.import.version.range}",
+                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
+                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
+                            org.apache.lucene.*,
+                            *;resolution:=optional
+                        </Import-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+        </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.wso2v4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.ui</artifactId>
+            <version>${carbon.platform.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.common</artifactId>
+	    <version>${apache.stratos.version}</version>
+        </dependency>
+	<dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.redirector.servlet.stub</artifactId>
+            <version>${carbon.platform.version}</version>
+        </dependency>
+
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/clients/RedirectorServletServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/clients/RedirectorServletServiceClient.java b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/clients/RedirectorServletServiceClient.java
new file mode 100644
index 0000000..a3ae54b
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/clients/RedirectorServletServiceClient.java
@@ -0,0 +1,90 @@
+/*
+ * 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.redirector.servlet.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.redirector.servlet.stub.RedirectorServletServiceStub;
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.utils.ServerConstants;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSession;
+
+public class RedirectorServletServiceClient {
+     private static final Log log = LogFactory.getLog(RedirectorServletServiceClient.class);
+
+    private RedirectorServletServiceStub stub;
+    private String epr;
+
+    public RedirectorServletServiceClient(
+            String cookie, String backendServerURL, ConfigurationContext configContext)
+            throws RegistryException {
+
+        epr = backendServerURL + "RedirectorServletService";
+
+        try {
+            stub = new RedirectorServletServiceStub(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 RedirectorServletServiceClient(ServletContext context, HttpSession session)
+            throws RegistryException {
+
+        String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+        String backendServerURL = CarbonUIUtil.getServerURL(context, session);
+        ConfigurationContext configContext = (ConfigurationContext) context.
+                getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+        epr = backendServerURL + "RedirectorServletService";
+
+        try {
+            stub = new RedirectorServletServiceStub(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 validateTenant(String tenantDomain) throws Exception {
+        return stub.validateTenant(tenantDomain);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/filters/AllPagesFilter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/filters/AllPagesFilter.java b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/filters/AllPagesFilter.java
new file mode 100644
index 0000000..4d64d7a
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/filters/AllPagesFilter.java
@@ -0,0 +1,167 @@
+/*
+ * 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.redirector.servlet.ui.filters;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+import org.apache.stratos.common.constants.StratosConstants;
+import org.apache.stratos.redirector.servlet.ui.clients.RedirectorServletServiceClient;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+public class AllPagesFilter implements Filter {
+    private static final Log log = LogFactory.getLog(AllPagesFilter.class);
+    private static Map<String, Boolean> tenantExistMap = new HashMap<String, Boolean>();
+
+    ServletContext context;
+
+    public void init(FilterConfig filterConfig) throws ServletException {
+        context = filterConfig.getServletContext();
+    }
+
+    public void doFilter(ServletRequest servletRequest,
+                         ServletResponse servletResponse, FilterChain filterChain) throws
+            IOException, ServletException {
+        if (!(servletRequest instanceof HttpServletRequest)) {
+            // no filtering
+            return;
+        }
+        HttpServletRequest request = (HttpServletRequest) servletRequest;
+        String requestedURI = request.getRequestURI();
+
+        String contextPath = request.getContextPath();
+        if (contextPath == null || ("/").equals(contextPath)) {
+        	contextPath = "";
+        }
+        
+        StringTokenizer tokenizer = new StringTokenizer(requestedURI.substring(contextPath.length() + 1), "/");
+        String[] firstUriTokens = new String[2];
+        int i = 0;
+        while (tokenizer.hasMoreElements()) {
+            firstUriTokens[i] = tokenizer.nextToken();
+            i++;
+            if (i > 1) {
+                break;
+            }
+        }
+        if (i > 1 && firstUriTokens[0].equals("t")) {
+            if (requestedURI.startsWith("//")) {
+                requestedURI = requestedURI.replaceFirst("//", "/");
+            }
+            String path = requestedURI.substring(contextPath.length() + firstUriTokens[0].length() +
+                    firstUriTokens[1].length() + 2);
+
+            // need to validate the tenant exists
+            String tenantDomain = firstUriTokens[1];
+            boolean tenantExists = true;
+            boolean tenantActive = true;
+
+            if (tenantExistMap.get(tenantDomain) == null) {
+                // we have to call the service :(
+                RedirectorServletServiceClient client;
+                try {
+                    client = new RedirectorServletServiceClient(context, request.getSession());
+                } catch (Exception e) {
+                    String msg = "Error in constructing RedirectorServletServiceClient.";
+                    log.error(msg, e);
+                    throw new ServletException(msg, e);
+                }
+
+                try {
+                    String status = client.validateTenant(tenantDomain);
+                    tenantExists = !StratosConstants.INVALID_TENANT.equals(status);
+                    if (tenantExists && StratosConstants.ACTIVE_TENANT.equals(status)) {
+                        //tenantExists = true;
+                        tenantActive = true;
+                    }
+                } catch (Exception e) {
+                    String msg = "Error in checking the existing of the tenant domain: " +
+                            tenantDomain + ".";
+                    log.error(msg, e);
+                    throw new ServletException(msg, e);
+                }
+            }
+            // we have some backup stuff, if the tenant doesn't exists
+            if (tenantExists) {
+                if (tenantActive) {
+                    // we put this to hash only if the original tenant domain exist
+                    tenantExistMap.put(tenantDomain, true);
+                } else {
+                    String errorPage = contextPath +
+                            "/carbon/admin/error.jsp?The Requested tenant domain: " +
+                            tenantDomain + " is inactive.";
+                    RequestDispatcher requestDispatcher =
+                            request.getRequestDispatcher(errorPage);
+                    requestDispatcher.forward(request, servletResponse);
+                    return;
+                }
+            } else {
+                String errorPage = contextPath +
+                        "/carbon/admin/error.jsp?The Requested tenant domain: " +
+                        tenantDomain + " doesn't exist.";
+                RequestDispatcher requestDispatcher =
+                        request.getRequestDispatcher(errorPage);
+                requestDispatcher.forward(request, servletResponse);
+                return;
+            }
+            request.setAttribute(MultitenantConstants.TENANT_DOMAIN, tenantDomain);
+//            if (path.indexOf("admin/login.jsp") >= 0) {
+//                // we are going to apply the login.jsp filter + tenant specif filter both in here
+//                path = path.replaceAll("admin/login.jsp",
+//                        "tenant-login/login_ajaxprocessor.jsp");
+//                request.setAttribute(StratosConstants.TENANT_SPECIFIC_URL_RESOLVED, "1");
+//            }
+            if (path.indexOf("/admin/index.jsp") >= 0) {
+                // we are going to apply the login.jsp filter + tenant specif filter both in here
+                path = path.replaceAll("/admin/index.jsp", "/tenant-dashboard/index.jsp");
+                request.setAttribute(StratosConstants.TENANT_SPECIFIC_URL_RESOLVED, "1");
+            }
+            if (path.indexOf("admin/docs/userguide.html") >= 0) {
+                // we are going to apply the dasbhoard docs.jsp filter +
+                // tenant specif filter both in here
+                path = path.replaceAll("admin/docs/userguide.html",
+                        "tenant-dashboard/docs/userguide.html");
+                request.setAttribute(StratosConstants.TENANT_SPECIFIC_URL_RESOLVED, "1");
+            }
+            if ("".equals(path) || "/".equals(path) || "/carbon".equals(path) ||
+                    "/carbon/".equals(path) || "/carbon/admin".equals(path) ||
+                    "/carbon/admin/".equals(path)) {
+                // we have to redirect the root to the login page directly
+                path = contextPath + "/carbon/admin/login.jsp";             
+            	((HttpServletResponse) servletResponse).sendRedirect(path);
+                return;
+            }
+            RequestDispatcher requestDispatcher =
+                    request.getRequestDispatcher(path);            
+            requestDispatcher.forward(request, servletResponse);
+            return;
+        }
+    }
+
+    public void destroy() {
+        // nothing to destroy
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/internal/RedirectorServletUIComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/internal/RedirectorServletUIComponent.java b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/internal/RedirectorServletUIComponent.java
new file mode 100644
index 0000000..c917923
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/internal/RedirectorServletUIComponent.java
@@ -0,0 +1,45 @@
+/*
+ * 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.redirector.servlet.ui.internal;
+
+import org.apache.stratos.redirector.servlet.ui.util.Util;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * @scr.component name="org.apache.stratosredirector.servlet.ui"
+ * immediate="true"
+ */
+public class RedirectorServletUIComponent {
+     private static Log log = LogFactory.getLog(RedirectorServletUIComponent.class);
+
+    protected void activate(ComponentContext context) {
+        try {
+            Util.domainRegisterServlet(context.getBundleContext());
+            log.debug("******* Multitenancy Redirector Servlet UI bundle is activated ******* ");
+        } catch (Exception e) {
+            log.error("******* Multitenancy Redirector Servlet UI bundle failed activating ****", e);
+        }
+    }
+
+    protected void deactivate(ComponentContext context) {
+        log.debug("******* Multitenancy Redirector Servlet UI bundle is deactivated ******* ");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/util/Util.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/util/Util.java b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/util/Util.java
new file mode 100644
index 0000000..954f29b
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet.ui/src/main/java/org/apache/stratos/redirector/servlet/ui/util/Util.java
@@ -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.
+ */
+package org.apache.stratos.redirector.servlet.ui.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.apache.stratos.redirector.servlet.ui.filters.AllPagesFilter;
+import org.wso2.carbon.utils.CarbonUtils;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+
+import javax.servlet.Filter;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+public class Util {
+
+    private static final Log log = LogFactory.getLog(Util.class);
+
+    private static ServiceRegistration redirectorServiceRegistration;
+
+    public static void domainRegisterServlet(BundleContext bundleContext) throws Exception {
+        if (!CarbonUtils.isRemoteRegistry()) {
+            HttpServlet reirectorServlet = new HttpServlet() {
+                // the redirector filter will forward the request before this servlet is hit
+                protected void doGet(HttpServletRequest request, HttpServletResponse response)
+                        throws ServletException, IOException {
+                }
+            };
+
+            Filter redirectorFilter = new AllPagesFilter();
+
+            Dictionary redirectorServletAttributes = new Hashtable(2);
+            Dictionary redirectorParams = new Hashtable(2);
+            redirectorParams.put("url-pattern", "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX);
+            redirectorParams.put("associated-filter", redirectorFilter);
+            redirectorParams.put("servlet-attributes", redirectorServletAttributes);
+
+            redirectorServiceRegistration = bundleContext.registerService(Servlet.class.getName(),
+                    reirectorServlet, redirectorParams);
+
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet.ui/src/main/resources/RedirectorServletService.wsdl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet.ui/src/main/resources/RedirectorServletService.wsdl b/components/org.apache.stratos.redirector.servlet.ui/src/main/resources/RedirectorServletService.wsdl
new file mode 100644
index 0000000..374ac3b
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet.ui/src/main/resources/RedirectorServletService.wsdl
@@ -0,0 +1,102 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.servlet.redirector.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services.servlet.redirector.carbon.wso2.org">
+    <wsdl:documentation>RedirectorServletService</wsdl:documentation>
+    <wsdl:types>
+        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.servlet.redirector.carbon.wso2.org">
+            <xs:element name="validateTenantException">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="validateTenantException" nillable="true" type="ns:Exception" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:complexType name="Exception">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
+                </xs:sequence>
+            </xs:complexType>
+            <xs:element name="validateTenant">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="validateTenantResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="validateTenantRequest">
+        <wsdl:part name="parameters" element="ns:validateTenant" />
+    </wsdl:message>
+    <wsdl:message name="validateTenantResponse">
+        <wsdl:part name="parameters" element="ns:validateTenantResponse" />
+    </wsdl:message>
+    <wsdl:message name="validateTenantException">
+        <wsdl:part name="parameters" element="ns:validateTenantException" />
+    </wsdl:message>
+    <wsdl:portType name="RedirectorServletServicePortType">
+        <wsdl:operation name="validateTenant">
+            <wsdl:input message="ns:validateTenantRequest" wsaw:Action="urn:validateTenant" />
+            <wsdl:output message="ns:validateTenantResponse" wsaw:Action="urn:validateTenantResponse" />
+            <wsdl:fault message="ns:validateTenantException" name="validateTenantException" wsaw:Action="urn:validateTenantvalidateTenantException" />
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="RedirectorServletServiceSoap11Binding" type="ns:RedirectorServletServicePortType">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="validateTenant">
+            <soap:operation soapAction="urn:validateTenant" style="document" />
+            <wsdl:input>
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+            </wsdl:output>
+            <wsdl:fault name="validateTenantException">
+                <soap:fault use="literal" name="validateTenantException" />
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="RedirectorServletServiceSoap12Binding" type="ns:RedirectorServletServicePortType">
+        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+        <wsdl:operation name="validateTenant">
+            <soap12:operation soapAction="urn:validateTenant" style="document" />
+            <wsdl:input>
+                <soap12:body use="literal" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal" />
+            </wsdl:output>
+            <wsdl:fault name="validateTenantException">
+                <soap12:fault use="literal" name="validateTenantException" />
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="RedirectorServletServiceHttpBinding" type="ns:RedirectorServletServicePortType">
+        <http:binding verb="POST" />
+        <wsdl:operation name="validateTenant">
+            <http:operation location="validateTenant" />
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters" />
+            </wsdl:input>
+            <wsdl:output>
+                <mime:content type="text/xml" part="parameters" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="RedirectorServletService">
+        <wsdl:port name="RedirectorServletServiceHttpsSoap11Endpoint" binding="ns:RedirectorServletServiceSoap11Binding">
+            <soap:address location="https://10.100.0.161:9443/services/RedirectorServletService.RedirectorServletServiceHttpsSoap11Endpoint/" />
+        </wsdl:port>
+        <wsdl:port name="RedirectorServletServiceHttpsSoap12Endpoint" binding="ns:RedirectorServletServiceSoap12Binding">
+            <soap12:address location="https://10.100.0.161:9443/services/RedirectorServletService.RedirectorServletServiceHttpsSoap12Endpoint/" />
+        </wsdl:port>
+        <wsdl:port name="RedirectorServletServiceHttpsEndpoint" binding="ns:RedirectorServletServiceHttpBinding">
+            <http:address location="https://10.100.0.161:9443/services/RedirectorServletService.RedirectorServletServiceHttpsEndpoint/" />
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet/pom.xml b/components/org.apache.stratos.redirector.servlet/pom.xml
new file mode 100644
index 0000000..c560810
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet/pom.xml
@@ -0,0 +1,101 @@
+<!-- 
+  #  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.straos.redirector.servlet</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Stratos - Tenant Specific URL redirector</name>
+
+    <build>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <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>
+                        <Private-Package>
+                            org.apache.stratos.redirector.servlet.services.*,
+                            org.apache.stratos.redirector.servlet.internal.*,
+                        </Private-Package>
+                        <Export-Package>
+                            org.apache.stratos.redirector.servlet.util.*,
+                        </Export-Package>
+                        <Import-Package>
+                            org.wso2.carbon.registry.core.*;version=1.0.1,
+                            !javax.xml.namespace,
+                            javax.xml.namespace; version=0.0.0,
+                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
+                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
+                            org.apache.axiom.*; version="${axiom.osgi.version.range}",
+                            *;resolution:=optional
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.axis2.wso2</groupId>
+            <artifactId>axis2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.registry.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.common</artifactId>
+	    <version>${apache.stratos.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.activation</artifactId>
+	    <version>${apache.stratos.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/internal/RedirectorServletServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/internal/RedirectorServletServiceComponent.java b/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/internal/RedirectorServletServiceComponent.java
new file mode 100644
index 0000000..22c9a04
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/internal/RedirectorServletServiceComponent.java
@@ -0,0 +1,80 @@
+/*
+ * 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.redirector.servlet.internal;
+
+import org.apache.stratos.redirector.servlet.util.Util;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.service.component.ComponentContext;
+import org.wso2.carbon.registry.core.service.RegistryService;
+import org.wso2.carbon.user.core.service.RealmService;
+import org.apache.stratos.activation.service.ActivationService;
+
+/**
+ * @scr.component name="org.apache.stratos.redirector.servlet"
+ * immediate="true"
+ * @scr.reference name="registry.service"
+ * interface="org.wso2.carbon.registry.core.service.RegistryService" cardinality="1..1"
+ * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService"
+ * @scr.reference name="user.realmservice.default" interface="org.wso2.carbon.user.core.service.RealmService"
+ * cardinality="1..1" policy="dynamic" bind="setRealmService"
+ * unbind="unsetRealmService"
+ * @scr.reference name="activation.service" interface="org.apache.stratos.activation.service.ActivationService"
+ * cardinality="0..1" policy="dynamic" bind="setActivationService"
+ * unbind="unsetActivationService"
+ */
+public class RedirectorServletServiceComponent {
+     private static Log log = LogFactory.getLog(RedirectorServletServiceComponent.class);
+
+    protected void activate(ComponentContext context) {
+        try {
+            log.debug("******* Multitenancy Redirector Servlet admin service bundle is activated ******* ");
+        } catch (Exception e) {
+            log.error("******* Multitenancy Redirector Servlet admin service bundle failed activating ****", e);
+        }
+    }
+
+    protected void deactivate(ComponentContext context) {
+        log.debug("******* Multitenancy Redirector Servlet admin service bundle is deactivated ******* ");
+    }
+
+    protected void setRegistryService(RegistryService registryService) {
+        Util.setRegistryService(registryService);
+    }
+
+    protected void unsetRegistryService(RegistryService registryService) {
+        Util.setRegistryService(null);
+    }
+
+    protected void setRealmService(RealmService realmService) {
+        Util.setRealmService(realmService);
+    }
+
+    protected void unsetRealmService(RealmService realmService) {
+        Util.setRealmService(null);
+    }
+
+    protected void setActivationService(ActivationService activationService) {
+        Util.setActivationService(activationService);
+    }
+
+    protected void unsetActivationService(ActivationService activationService) {
+        Util.setActivationService(null);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/services/RedirectorServletService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/services/RedirectorServletService.java b/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/services/RedirectorServletService.java
new file mode 100644
index 0000000..ed1d5cb
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/services/RedirectorServletService.java
@@ -0,0 +1,37 @@
+/*
+ * 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.redirector.servlet.services;
+
+import org.apache.stratos.redirector.servlet.util.Util;
+import org.wso2.carbon.user.core.tenant.TenantManager;
+import org.apache.stratos.common.constants.StratosConstants;
+
+public class RedirectorServletService {
+    public String validateTenant(String tenantDomain) throws Exception {
+        TenantManager tenantManager = Util.getTenantManager();
+        int tenantId = tenantManager.getTenantId(tenantDomain);
+        if (tenantId <= 0) {
+            return StratosConstants.INVALID_TENANT;
+        } else if (Util.getActivationService() != null &&
+                !Util.getActivationService().isActive(tenantId)) {
+            return StratosConstants.INACTIVE_TENANT;
+        }
+        return StratosConstants.ACTIVE_TENANT;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/util/Util.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/util/Util.java b/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/util/Util.java
new file mode 100644
index 0000000..3193c30
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet/src/main/java/org/apache/stratos/redirector/servlet/util/Util.java
@@ -0,0 +1,73 @@
+/*
+ * 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.redirector.servlet.util;
+
+import org.wso2.carbon.registry.core.service.RegistryService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.user.core.service.RealmService;
+import org.wso2.carbon.user.core.tenant.TenantManager;
+import org.wso2.carbon.user.api.RealmConfiguration;
+import org.osgi.framework.ServiceRegistration;
+import org.apache.stratos.activation.service.ActivationService;
+
+import java.io.*;
+import java.util.*;
+
+public class Util {
+
+    private static final Log log = LogFactory.getLog(Util.class);
+
+    private static RegistryService registryService;
+    private static RealmService realmService;
+    private static ServiceRegistration redirectorServiceRegistration = null;
+    private static ActivationService activationService = null;
+
+    public static synchronized void setRegistryService(RegistryService service) {
+        if (registryService == null) {
+            registryService = service;
+        }
+    }
+    public static RegistryService getRegistryService() {
+        return registryService;
+    }
+
+    public static synchronized void setActivationService(ActivationService service) {
+        if (activationService == null) {
+            activationService = service;
+        }
+    }
+    public static ActivationService getActivationService() {
+        return activationService;
+    }
+
+    public static synchronized void setRealmService(RealmService service) {
+        if (realmService == null) {
+            realmService = service;
+        }
+    }
+
+    public static TenantManager getTenantManager() {
+        return realmService.getTenantManager();
+    }
+
+    public static RealmConfiguration getBootstrapRealmConfiguration() {
+        return realmService.getBootstrapRealmConfiguration();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.redirector.servlet/src/main/resources/META-INF/services.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.redirector.servlet/src/main/resources/META-INF/services.xml b/components/org.apache.stratos.redirector.servlet/src/main/resources/META-INF/services.xml
new file mode 100644
index 0000000..dd13fd4
--- /dev/null
+++ b/components/org.apache.stratos.redirector.servlet/src/main/resources/META-INF/services.xml
@@ -0,0 +1,30 @@
+<?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.
+  -->
+<serviceGroup>
+    <service name="RedirectorServletService" scope="transportsession">
+        <transports>
+            <transport>https</transport>
+        </transports>
+        <parameter name="ServiceClass" locked="false">
+            org.apache.stratos.redirector.servlet.services.RedirectorServletService
+        </parameter>
+    </service>
+    <parameter name="hiddenService" locked="true">true</parameter>
+</serviceGroup>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/pom.xml b/components/org.apache.stratos.sso.redirector.ui/pom.xml
new file mode 100644
index 0000000..1b425b7
--- /dev/null
+++ b/components/org.apache.stratos.sso.redirector.ui/pom.xml
@@ -0,0 +1,87 @@
+<?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.sso.redirector.ui</artifactId>
+    <version>2.1.0</version>
+    <packaging>bundle</packaging>
+    <name>Apache Stratos - SSO redirector UI component</name>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <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>
+                        <Private-Package>
+                            org.apache.stratos.sso.redirector.ui.internal.*,
+                        </Private-Package>
+                        <Import-Package>
+                            javax.servlet;version="${imp.pkg.version.javax.servlet}",
+                            javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
+                            org.apache.lucene.*,
+                            *;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.ui</artifactId>
+    	    <version>4.1.0</version>
+        </dependency>
+	<dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>org.wso2.carbon.identity.authenticator.saml2.sso.common</artifactId>
+    	    <version>4.1.0</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/RedirectorJSPFilter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/RedirectorJSPFilter.java b/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/RedirectorJSPFilter.java
new file mode 100644
index 0000000..1c7ef60
--- /dev/null
+++ b/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/RedirectorJSPFilter.java
@@ -0,0 +1,60 @@
+/*
+ * 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.sso.redirector.ui.internal;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * This class acts as a servlet filter which forwads the requests coming for sso-acs/redirect_ajaxprocessor.jsp
+ * to stratos-auth/redirect_ajaxprocessor.jsp
+ */
+public class RedirectorJSPFilter implements Filter {
+
+    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
+                         FilterChain filterChain) throws IOException, ServletException {
+        if (!(servletRequest instanceof HttpServletRequest)) {
+            return;
+        }
+        String url = ((HttpServletRequest) servletRequest).getRequestURI();
+        if(url.contains("//")){
+            url = url.replace("//", "/");
+        }
+        url = url.replace("sso-acs/redirect_ajaxprocessor.jsp", "stratos-auth/redirect_ajaxprocessor.jsp");
+        RequestDispatcher requestDispatcher =
+                servletRequest.getRequestDispatcher(url);
+        requestDispatcher.forward(servletRequest, servletResponse);
+    }
+
+    public void init(FilterConfig filterConfig) throws ServletException {
+        // not required to implement
+    }
+
+    public void destroy() {
+        // not required to implement
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/SSORedirectorServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/SSORedirectorServiceComponent.java b/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/SSORedirectorServiceComponent.java
new file mode 100644
index 0000000..5f2521b
--- /dev/null
+++ b/components/org.apache.stratos.sso.redirector.ui/src/main/java/org/apache/stratos/sso/redirector/ui/internal/SSORedirectorServiceComponent.java
@@ -0,0 +1,66 @@
+/*
+ * 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.sso.redirector.ui.internal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.service.component.ComponentContext;
+
+import javax.servlet.Filter;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+/**
+ * @scr.component name="org.apache.stratos.sso.redirector.ui"
+ * immediate="true"
+ */
+public class SSORedirectorServiceComponent {
+    private static Log log = LogFactory.getLog(SSORedirectorServiceComponent.class);
+
+    protected void activate(ComponentContext ctxt) {
+
+        // register a servlet filter for SSO redirector page
+        HttpServlet redirectJSPRedirectorServlet = new HttpServlet() {
+            protected void doGet(HttpServletRequest request, HttpServletResponse response)
+                    throws ServletException, IOException {
+            }
+        };
+
+        Filter redirectPageFilter = new RedirectorJSPFilter();
+        Dictionary redirectorPageFilterAttrs = new Hashtable(2);
+        Dictionary redirectorPageFilterParams = new Hashtable(2);
+        redirectorPageFilterParams.put("url-pattern", "/carbon/sso-acs/redirect_ajaxprocessor.jsp");
+        redirectorPageFilterParams.put("associated-filter", redirectPageFilter);
+        redirectorPageFilterParams.put("servlet-attributes", redirectorPageFilterAttrs);
+        ctxt.getBundleContext().registerService(Servlet.class.getName(), redirectJSPRedirectorServlet,
+                                                redirectorPageFilterParams);
+        log.debug("Stratos SSO Redirector bundle is activated..");
+    }
+
+    protected void deactivate(ComponentContext ctxt) {
+        log.debug("Stratos SSO Redirector bundle is deactivated..");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/org/apache/stratos/sso/redirector/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/org/apache/stratos/sso/redirector/ui/i18n/Resources.properties b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/org/apache/stratos/sso/redirector/ui/i18n/Resources.properties
new file mode 100644
index 0000000..d941d56
--- /dev/null
+++ b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/org/apache/stratos/sso/redirector/ui/i18n/Resources.properties
@@ -0,0 +1,32 @@
+saml.sso.menu=SAML SSO
+saml.sso=SAML 2.0 based Single Sign-On
+enter.password.to.signin=Please enter your credentials to sign in to WSO2 Identity Server SAML SSO
+username=Username
+password=Password
+login=Sign In
+sso.configuration=SAML SSO Configuration
+sp.issuer=Issuer
+sp.assertionConsumerURL=Assertion Consumer URL
+sp.certAlias=Certificate Alias
+saml.sso.service.providers.not.found=No SAML SSO Service Providers are found.
+saml.sso.add.service.provider=Add new Service Provider
+saml.sso.add=Add
+sp.enter.valid.endpoint.address=Please enter a valid URL for AssertionConsumerURL
+sp.enter.valid.issuer=Please enter a valid issuer
+sp.enter.valid.claimID=ClaimID field cannot be left empty
+sp.added.successfully=Service Provider Added Successfully
+error.adding.sp=Could not add Service Provider. You might be entering a duplicate Service Provider
+remove.message1=You are about to remove the trusted service provider
+remove.message2=. Do you want to proceed?
+error.removing.sp=Problem in removing the service provider
+select.subject.type=Select the value to be appeared as the subject
+select.subject.type.username=Use current username as the subject
+select.subject.type.claimid=Use a custom claim as the subject
+subject.type.claimid=Claim ID
+subject.type.namidformat=NameID Format
+logout.url=Custom Logout URL
+validate.signature=Enable Signature Validation in Authentication Requests and Logout Requests
+saml.sso.generated.key=Generated Key for Signing SAML2 based single sign-on
+saml.sso.download.pub.key=Download the public key of the generated key pair
+saml.sso.add.sp.to.genkey=Add atleast one service provider to generate a key pair
+login.fail.message=Login failed! Please recheck the username and password and try again.

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/css/stratos-loginpage.css
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/css/stratos-loginpage.css b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/css/stratos-loginpage.css
new file mode 100644
index 0000000..fce87f7
--- /dev/null
+++ b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/css/stratos-loginpage.css
@@ -0,0 +1,94 @@
+body {
+background-image:url(../images/st-login-body-bg.gif);
+background-position:left top;
+background-repeat:repeat-x;
+font-family:"Calibri",Arial,Helvetica,san-serif;
+font-size:0.8em;
+margin:0;
+padding:0;
+}
+p {
+}
+td {
+}
+a:link {
+text-decoration:none;
+}
+a:visited {
+}
+a:hover {
+}
+a:active {
+}
+a img {
+border:0 none;
+}
+div#middle {
+background-color:#FFFFFF;
+margin:auto;
+width:961px;
+}
+div#header {
+background-image:url(../images/st-login-header-bg.gif);
+background-position:left top;
+background-repeat:no-repeat;
+height:87px;
+padding-top:94px;
+text-align:center;
+}
+div#content {
+background-image:url(../images/st-login-content-bg.gif);
+background-position:left top;
+background-repeat:no-repeat;
+padding-left:60px;
+padding-right:60px;
+padding-top:20px;
+}
+div#intro {
+padding-bottom:10px;
+text-align:center;
+}
+div#register {
+float:left;
+padding-top:85px;
+text-align:center;
+width:420px;
+}
+div#sign-in {
+border-left:1px solid #0499CC;
+float:left;
+padding:20px 30px 30px 50px;
+text-align:left;
+width:340px;
+}
+div#sign-in h2 {
+border-bottom:1px solid #78BDE8;
+font-size:130%;
+margin-bottom:10px;
+margin-top:0;
+padding-bottom:10px;
+padding-top:0;
+}
+div#sign-in table tr td {
+padding-bottom:5px;
+padding-right:7px;
+}
+div#sign-in table {
+border-bottom:1px solid #78BDE8;
+margin-bottom:7px;
+}
+div#footer {
+background-image:url(../images/st-login-footer-bg.gif);
+background-position:left top;
+background-repeat:no-repeat;
+margin-top:5px;
+padding-bottom:7px;
+padding-top:25px;
+text-align:center;
+}
+div.clear {
+clear:both;
+}
+#loginForm td label{
+    font-size:11px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png
new file mode 100644
index 0000000..eab6259
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config-ok.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png
new file mode 100644
index 0000000..994c861
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-identity-sso-config.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-sso-config.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-sso-config.png b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-sso-config.png
new file mode 100644
index 0000000..375e9ee
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/cloud-sso-config.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/delete.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/delete.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/delete.gif
new file mode 100644
index 0000000..471f55c
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/delete.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/import.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/import.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/import.gif
new file mode 100644
index 0000000..c9fb1df
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/import.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/loading.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/loading.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/loading.gif
new file mode 100644
index 0000000..5b200ed
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/loading.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/logo.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/logo.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/logo.gif
new file mode 100644
index 0000000..837f813
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/logo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/policy.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/policy.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/policy.gif
new file mode 100644
index 0000000..f9c58f5
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/policy.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/powered.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/powered.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/powered.gif
new file mode 100644
index 0000000..b8bc163
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/powered.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/register.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/register.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/register.gif
new file mode 100644
index 0000000..f225e38
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/register.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/sso.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/sso.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/sso.gif
new file mode 100644
index 0000000..7f2e74a
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/sso.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif
new file mode 100644
index 0000000..dc2c240
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-body-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif
new file mode 100644
index 0000000..9624125
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-content-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif
new file mode 100644
index 0000000..dc317e5
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-footer-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif
new file mode 100644
index 0000000..bd228c9
Binary files /dev/null and b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/images/st-login-header-bg.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/888ca4d5/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp
new file mode 100644
index 0000000..5725f7a
--- /dev/null
+++ b/components/org.apache.stratos.sso.redirector.ui/src/main/resources/web/stratos-auth/redirect_ajaxprocessor.jsp
@@ -0,0 +1,177 @@
+<!--
+  ~ 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.opensaml.saml2.core.AuthnRequest" %>
+<%@page import="org.opensaml.saml2.core.LogoutRequest" %>
+<%@ page
+        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.SAML2SSOAuthenticatorConstants" %>
+<%@ page import="org.wso2.carbon.identity.authenticator.saml2.sso.common.SSOSessionManager" %>
+<%@ page
+        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.builders.AuthenticationRequestBuilder" %>
+<%@ page
+        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.builders.LogoutRequestBuilder" %>
+<%@ page
+        import="org.wso2.carbon.identity.authenticator.saml2.sso.common.Util" %>
+<%@ page import="org.wso2.carbon.registry.core.utils.UUIDGenerator" %>
+<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+<head>
+    <title>WSO2 Stratos Identity</title>
+    <style type="text/css" media="screen"><!--
+    body {
+        color: #111111;
+	font: 13px/27px Arial,sans-serif;
+        font-size-adjust: none;
+        font-style: normal;
+        font-variant: normal;
+    }
+
+    
+
+    .redirectForm {
+        display: inline;
+    }
+    .dots{
+	border:solid 1x #ccc;
+	width:10px;
+	height:10px;
+	float:left;
+	margin:5px;
+	-moz-border-radius: 4px;
+	border-radius: 4px;
+	-moz-box-shadow: 3px 3px 3px #888;
+	-webkit-box-shadow: 3px 3px 3px #888;
+	box-shadow: 3px 3px 3px #888;
+    }
+    .dots-pane{
+	width:150px;
+	margin:0px 10px;
+    }
+    .dot0{
+	background-color:#111;
+    }
+    .dot1{
+	background-color:#444;
+    }
+    .dot2{
+	background-color:#777;
+    }
+    .dot3{
+	background-color:#ddd;
+    }
+    .dot4{
+	background-color:#eee;
+    }
+    .dot5{
+	background-color:#fff;
+    }
+    .loading-text{
+	padding:10px;
+	font-weight:bold;
+	font-size:16px;
+    }
+    --></style>
+</head>
+<body>
+<%
+    String encodedReq = null;
+    String relayState = "";
+    String domain = null;
+    if (request.getParameter(SAML2SSOAuthenticatorConstants.LOG_OUT_REQ) != null) {
+        LogoutRequestBuilder logoutRequestBuilder = new LogoutRequestBuilder();
+        LogoutRequest logoutReq = logoutRequestBuilder.buildLogoutRequest((String) request.getAttribute(
+                SAML2SSOAuthenticatorConstants.LOGGED_IN_USER), SAML2SSOAuthenticatorConstants.LOGOUT_USER);
+        encodedReq = Util.encode(Util.marshall(logoutReq));
+        relayState = UUIDGenerator.generateUUID();
+    } else {
+        AuthenticationRequestBuilder authnReqGenerator = new AuthenticationRequestBuilder();
+        AuthnRequest authRequest = authnReqGenerator.buildAuthenticationRequest(null);
+        encodedReq = Util.encode(Util.marshall(authRequest));
+        relayState = UUIDGenerator.generateUUID();
+        domain = (String) request.getAttribute(MultitenantConstants.TENANT_DOMAIN);
+    }
+    // add the relay state to Session Manager
+    SSOSessionManager.addAuthnRequest(relayState);
+
+%>
+<div class="loading-text">Loading WSO2 StratosLive...</div>
+<div class="dots-pane" id="dotsContainer">
+    <div class="dots"></div>
+    <div class="dots"></div>
+    <div class="dots"></div>
+    <div class="dots"></div>
+    <div class="dots"></div>
+    <div class="dots"></div>
+</div>
+
+<script>
+    var t;
+    var timer_is_on = 0;
+    var j=0;
+    var dotsContainer = document.getElementById('dotsContainer');
+    var dots = dotsContainer.childNodes;
+    var divdots = new Array();
+    for(var i=0;i<dots.length;i++){
+	if(dots[i].nodeName == "DIV" ){
+	    divdots.push(dots[i]);
+	}
+    }
+    function animateStuff(){
+	for(var i=0;i<divdots.length;i++){
+	    var classNumber;
+	    if((i+j)<divdots.length){
+		classNumber = i + j;
+	    }else{
+		classNumber = i + j - divdots.length;
+	    }
+	    divdots[i].className = "dots dot"+classNumber;
+	    
+	}
+	if(j<=5){
+	    j++;
+	}else{
+	    j=0;
+	}
+	t = setTimeout(animateStuff,200);
+    }
+
+    if(!timer_is_on){
+	animateStuff();
+    }
+</script>
+
+
+		
+<form method="post" action="<%=Util.getIdentityProviderSSOServiceURL()%>" class="redirectForm">
+    <input type="hidden"
+              name="<%=SAML2SSOAuthenticatorConstants.HTTP_POST_PARAM_SAML2_AUTH_REQ%>"
+              value="<%= encodedReq %>"/>
+        <input type="hidden" name="RelayState" value="<%= relayState %>"/>
+        <input type="hidden" name="<%= MultitenantConstants.TENANT_DOMAIN %>"
+               value="<%= domain %>"/>
+        <input type="hidden" name="<%= MultitenantConstants.SSO_AUTH_SESSION_ID %>" value="<%= session.getId() %>"/>
+        
+</form>
+	
+<script type="text/javascript">
+	document.forms[0].submit();
+</script>
+
+</body>
+</html>


[3/3] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos

Posted by la...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos


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

Branch: refs/heads/master
Commit: a5799ea86d6f18012af7f8ea6c01d3eafa873512
Parents: 888ca4d 30fae32
Author: Lakmal Warusawithana <la...@wso2.com>
Authored: Thu Jul 11 17:45:45 2013 +0530
Committer: Lakmal Warusawithana <la...@wso2.com>
Committed: Thu Jul 11 17:45:45 2013 +0530

----------------------------------------------------------------------
 .../org.apache.stratos.theme.mgt.ui/pom.xml     |  153 +++
 .../mgt/ui/clients/ThemeMgtServiceClient.java   |  424 ++++++
 .../processors/AddThemeResourceProcessor.java   |  223 ++++
 .../mgt/ui/servlets/ThemeResourceSevelet.java   |  125 ++
 .../stratos/theme/mgt/ui/utils/ThemeUtil.java   |   68 +
 .../src/main/resources/META-INF/component.xml   |   68 +
 .../theme/mgt/ui/i18n/JSResources.properties    |    2 +
 .../theme/mgt/ui/i18n/Resources.properties      |   51 +
 .../add_collection_ajaxprocessor.jsp            |   50 +
 .../add_text_resource_ajaxprocessor.jsp         |   59 +
 .../web/tenant-theme/content_ajaxprocessor.jsp  |  242 ++++
 .../resources/web/tenant-theme/css-editor.jsp   |   59 +
 .../web/tenant-theme/css/loginpage.css          |  110 ++
 .../resources/web/tenant-theme/css/tenant.css   |   74 ++
 .../web/tenant-theme/css/tenent-theme.css       |   32 +
 .../web/tenant-theme/css/theme-mgt.css          |   16 +
 .../web/tenant-theme/delete_ajaxprocessor.jsp   |   48 +
 .../display_text_content_ajaxprocessor.jsp      |   48 +
 .../tenant-theme/docs/images/change-logo.png    |  Bin 0 -> 14821 bytes
 .../web/tenant-theme/docs/images/edit-theme.png |  Bin 0 -> 83056 bytes
 .../tenant-theme/docs/images/select-theme.png   |  Bin 0 -> 61602 bytes
 .../web/tenant-theme/docs/userguide.html        |   78 ++
 .../edit_text_content_ajaxprocessor.jsp         |   97 ++
 .../web/tenant-theme/images/ajax-loader.gif     |  Bin 0 -> 673 bytes
 .../web/tenant-theme/images/button-back.gif     |  Bin 0 -> 819 bytes
 .../tenant-theme/images/content-back-left.jpg   |  Bin 0 -> 2240 bytes
 .../web/tenant-theme/images/content-back.jpg    |  Bin 0 -> 852 bytes
 .../tenant-theme/images/create-org-button.gif   |  Bin 0 -> 2576 bytes
 .../web/tenant-theme/images/footer.jpg          |  Bin 0 -> 836 bytes
 .../resources/web/tenant-theme/images/forum.gif |  Bin 0 -> 1977 bytes
 .../web/tenant-theme/images/header.jpg          |  Bin 0 -> 5837 bytes
 .../resources/web/tenant-theme/images/help.gif  |  Bin 0 -> 1229 bytes
 .../web/tenant-theme/images/images.gif          |  Bin 0 -> 1067 bytes
 .../web/tenant-theme/images/issue-tracker.gif   |  Bin 0 -> 1821 bytes
 .../resources/web/tenant-theme/images/logo.jpg  |  Bin 0 -> 7171 bytes
 .../web/tenant-theme/images/logomgt.gif         |  Bin 0 -> 596 bytes
 .../web/tenant-theme/images/mailing-list.gif    |  Bin 0 -> 2064 bytes
 .../web/tenant-theme/images/page-back.jpg       |  Bin 0 -> 871 bytes
 .../web/tenant-theme/images/people.gif          |  Bin 0 -> 22151 bytes
 .../web/tenant-theme/images/sel-02.jpg          |  Bin 0 -> 809 bytes
 .../web/tenant-theme/images/services.gif        |  Bin 0 -> 604 bytes
 .../web/tenant-theme/images/thememgt.gif        |  Bin 0 -> 1030 bytes
 .../web/tenant-theme/images/user-guide.gif      |  Bin 0 -> 2161 bytes
 .../import_resource_ajaxprocessor.jsp           |  101 ++
 .../web/tenant-theme/js/editarea/change_log.txt |  281 ++++
 .../js/editarea/edit_area/autocompletion.js     |  491 +++++++
 .../js/editarea/edit_area/edit_area.css         |  530 ++++++++
 .../js/editarea/edit_area/edit_area.js          |  525 ++++++++
 .../js/editarea/edit_area/edit_area_full.js     |   38 +
 .../editarea/edit_area/edit_area_functions.js   | 1203 ++++++++++++++++++
 .../js/editarea/edit_area/edit_area_loader.js   | 1080 ++++++++++++++++
 .../js/editarea/edit_area/elements_functions.js |  333 +++++
 .../js/editarea/edit_area/highlight.js          |  391 ++++++
 .../edit_area/images/autocompletion.gif         |  Bin 0 -> 359 bytes
 .../js/editarea/edit_area/images/close.gif      |  Bin 0 -> 102 bytes
 .../js/editarea/edit_area/images/fullscreen.gif |  Bin 0 -> 198 bytes
 .../js/editarea/edit_area/images/go_to_line.gif |  Bin 0 -> 1053 bytes
 .../js/editarea/edit_area/images/help.gif       |  Bin 0 -> 295 bytes
 .../js/editarea/edit_area/images/highlight.gif  |  Bin 0 -> 256 bytes
 .../js/editarea/edit_area/images/load.gif       |  Bin 0 -> 1041 bytes
 .../js/editarea/edit_area/images/move.gif       |  Bin 0 -> 257 bytes
 .../editarea/edit_area/images/newdocument.gif   |  Bin 0 -> 170 bytes
 .../js/editarea/edit_area/images/opacity.png    |  Bin 0 -> 147 bytes
 .../js/editarea/edit_area/images/processing.gif |  Bin 0 -> 825 bytes
 .../js/editarea/edit_area/images/redo.gif       |  Bin 0 -> 169 bytes
 .../edit_area/images/reset_highlight.gif        |  Bin 0 -> 168 bytes
 .../js/editarea/edit_area/images/save.gif       |  Bin 0 -> 285 bytes
 .../js/editarea/edit_area/images/search.gif     |  Bin 0 -> 191 bytes
 .../edit_area/images/smooth_selection.gif       |  Bin 0 -> 174 bytes
 .../js/editarea/edit_area/images/spacer.gif     |  Bin 0 -> 43 bytes
 .../edit_area/images/statusbar_resize.gif       |  Bin 0 -> 79 bytes
 .../js/editarea/edit_area/images/undo.gif       |  Bin 0 -> 175 bytes
 .../js/editarea/edit_area/images/word_wrap.gif  |  Bin 0 -> 951 bytes
 .../js/editarea/edit_area/keyboard.js           |  145 +++
 .../js/editarea/edit_area/langs/en.js           |   67 +
 .../js/editarea/edit_area/license_apache.txt    |    7 +
 .../js/editarea/edit_area/license_bsd.txt       |   10 +
 .../js/editarea/edit_area/license_lgpl.txt      |  458 +++++++
 .../js/editarea/edit_area/manage_area.js        |  623 +++++++++
 .../js/editarea/edit_area/reg_syntax.js         |  166 +++
 .../js/editarea/edit_area/reg_syntax/basic.js   |   69 +
 .../editarea/edit_area/reg_syntax/brainfuck.js  |   44 +
 .../js/editarea/edit_area/reg_syntax/c.js       |   62 +
 .../editarea/edit_area/reg_syntax/coldfusion.js |  119 ++
 .../js/editarea/edit_area/reg_syntax/cpp.js     |   65 +
 .../js/editarea/edit_area/reg_syntax/css.js     |   84 ++
 .../js/editarea/edit_area/reg_syntax/html.js    |   50 +
 .../js/editarea/edit_area/reg_syntax/java.js    |   56 +
 .../js/editarea/edit_area/reg_syntax/js.js      |   93 ++
 .../js/editarea/edit_area/reg_syntax/pas.js     |   82 ++
 .../js/editarea/edit_area/reg_syntax/perl.js    |   88 ++
 .../js/editarea/edit_area/reg_syntax/php.js     |  156 +++
 .../js/editarea/edit_area/reg_syntax/python.js  |  144 +++
 .../editarea/edit_area/reg_syntax/robotstxt.js  |   24 +
 .../js/editarea/edit_area/reg_syntax/ruby.js    |   67 +
 .../js/editarea/edit_area/reg_syntax/sql.js     |   55 +
 .../js/editarea/edit_area/reg_syntax/tsql.js    |   87 ++
 .../js/editarea/edit_area/reg_syntax/vb.js      |   52 +
 .../js/editarea/edit_area/reg_syntax/xml.js     |   56 +
 .../js/editarea/edit_area/regexp.js             |  139 ++
 .../js/editarea/edit_area/resize_area.js        |   73 ++
 .../js/editarea/edit_area/search_replace.js     |  174 +++
 .../js/editarea/edit_area/template.html         |  117 ++
 .../tenant-theme/js/editarea/license_apache.txt |    7 +
 .../tenant-theme/js/editarea/license_bsd.txt    |   10 +
 .../tenant-theme/js/editarea/license_lgpl.txt   |  458 +++++++
 .../web/tenant-theme/js/editarea/todo.txt       |   71 ++
 .../web/tenant-theme/js/theme_resource_util.js  |  828 ++++++++++++
 .../resources/web/tenant-theme/logo_mgt.jsp     |  221 ++++
 .../web/tenant-theme/metadata_resourcepath.jsp  |  107 ++
 .../web/tenant-theme/raw-collection-content.jsp |  756 +++++++++++
 .../rename_resource_ajaxprocessor.jsp           |   42 +
 .../web/tenant-theme/theme_advanced.jsp         |  140 ++
 .../resources/web/tenant-theme/theme_mgt.jsp    |  240 ++++
 .../tenant-theme/theme_mgt_ajaxprocessor.jsp    |   49 +
 .../web/tenant-theme/update_text_content.jsp    |   52 +
 components/org.apache.stratos.theme.mgt/pom.xml |  106 ++
 .../TenantThemeMgtServiceComponent.java         |  101 ++
 .../theme/mgt/services/ThemeMgtService.java     |  196 +++
 .../theme/mgt/util/ThemeLoadingListener.java    |   77 ++
 .../stratos/theme/mgt/util/ThemeUtil.java       |  306 +++++
 .../src/main/resources/META-INF/component.xml   |   30 +
 .../src/main/resources/META-INF/services.xml    |  103 ++
 .../org.wso2.carbon.theme.mgt.ui/2.1.0/pom.xml  |  148 ---
 .../mgt/ui/clients/ThemeMgtServiceClient.java   |  424 ------
 .../processors/AddThemeResourceProcessor.java   |  240 ----
 .../mgt/ui/servlets/ThemeResourceSevelet.java   |  124 --
 .../carbon/theme/mgt/ui/utils/ThemeUtil.java    |   67 -
 .../src/main/resources/META-INF/component.xml   |   68 -
 .../theme/mgt/ui/i18n/JSResources.properties    |    2 -
 .../theme/mgt/ui/i18n/Resources.properties      |   51 -
 .../add_collection_ajaxprocessor.jsp            |   49 -
 .../add_text_resource_ajaxprocessor.jsp         |   57 -
 .../web/tenant-theme/content_ajaxprocessor.jsp  |  241 ----
 .../resources/web/tenant-theme/css-editor.jsp   |   58 -
 .../web/tenant-theme/css/loginpage.css          |  110 --
 .../resources/web/tenant-theme/css/tenant.css   |   74 --
 .../web/tenant-theme/css/tenent-theme.css       |   32 -
 .../web/tenant-theme/css/theme-mgt.css          |   16 -
 .../web/tenant-theme/delete_ajaxprocessor.jsp   |   47 -
 .../display_text_content_ajaxprocessor.jsp      |   47 -
 .../tenant-theme/docs/images/change-logo.png    |  Bin 14821 -> 0 bytes
 .../web/tenant-theme/docs/images/edit-theme.png |  Bin 83056 -> 0 bytes
 .../tenant-theme/docs/images/select-theme.png   |  Bin 61602 -> 0 bytes
 .../web/tenant-theme/docs/userguide.html        |   77 --
 .../edit_text_content_ajaxprocessor.jsp         |   96 --
 .../web/tenant-theme/images/ajax-loader.gif     |  Bin 673 -> 0 bytes
 .../web/tenant-theme/images/button-back.gif     |  Bin 819 -> 0 bytes
 .../tenant-theme/images/content-back-left.jpg   |  Bin 2240 -> 0 bytes
 .../web/tenant-theme/images/content-back.jpg    |  Bin 852 -> 0 bytes
 .../tenant-theme/images/create-org-button.gif   |  Bin 2576 -> 0 bytes
 .../web/tenant-theme/images/footer.jpg          |  Bin 836 -> 0 bytes
 .../resources/web/tenant-theme/images/forum.gif |  Bin 1977 -> 0 bytes
 .../web/tenant-theme/images/header.jpg          |  Bin 5837 -> 0 bytes
 .../resources/web/tenant-theme/images/help.gif  |  Bin 1229 -> 0 bytes
 .../web/tenant-theme/images/images.gif          |  Bin 1067 -> 0 bytes
 .../web/tenant-theme/images/issue-tracker.gif   |  Bin 1821 -> 0 bytes
 .../resources/web/tenant-theme/images/logo.jpg  |  Bin 7171 -> 0 bytes
 .../web/tenant-theme/images/logomgt.gif         |  Bin 596 -> 0 bytes
 .../web/tenant-theme/images/mailing-list.gif    |  Bin 2064 -> 0 bytes
 .../web/tenant-theme/images/page-back.jpg       |  Bin 871 -> 0 bytes
 .../web/tenant-theme/images/people.gif          |  Bin 22151 -> 0 bytes
 .../web/tenant-theme/images/sel-02.jpg          |  Bin 809 -> 0 bytes
 .../web/tenant-theme/images/services.gif        |  Bin 604 -> 0 bytes
 .../web/tenant-theme/images/thememgt.gif        |  Bin 1030 -> 0 bytes
 .../web/tenant-theme/images/user-guide.gif      |  Bin 2161 -> 0 bytes
 .../import_resource_ajaxprocessor.jsp           |  100 --
 .../web/tenant-theme/js/editarea/change_log.txt |  281 ----
 .../js/editarea/edit_area/autocompletion.js     |  491 -------
 .../js/editarea/edit_area/edit_area.css         |  530 --------
 .../js/editarea/edit_area/edit_area.js          |  525 --------
 .../js/editarea/edit_area/edit_area_full.js     |   38 -
 .../editarea/edit_area/edit_area_functions.js   | 1203 ------------------
 .../js/editarea/edit_area/edit_area_loader.js   | 1080 ----------------
 .../js/editarea/edit_area/elements_functions.js |  333 -----
 .../js/editarea/edit_area/highlight.js          |  391 ------
 .../edit_area/images/autocompletion.gif         |  Bin 359 -> 0 bytes
 .../js/editarea/edit_area/images/close.gif      |  Bin 102 -> 0 bytes
 .../js/editarea/edit_area/images/fullscreen.gif |  Bin 198 -> 0 bytes
 .../js/editarea/edit_area/images/go_to_line.gif |  Bin 1053 -> 0 bytes
 .../js/editarea/edit_area/images/help.gif       |  Bin 295 -> 0 bytes
 .../js/editarea/edit_area/images/highlight.gif  |  Bin 256 -> 0 bytes
 .../js/editarea/edit_area/images/load.gif       |  Bin 1041 -> 0 bytes
 .../js/editarea/edit_area/images/move.gif       |  Bin 257 -> 0 bytes
 .../editarea/edit_area/images/newdocument.gif   |  Bin 170 -> 0 bytes
 .../js/editarea/edit_area/images/opacity.png    |  Bin 147 -> 0 bytes
 .../js/editarea/edit_area/images/processing.gif |  Bin 825 -> 0 bytes
 .../js/editarea/edit_area/images/redo.gif       |  Bin 169 -> 0 bytes
 .../edit_area/images/reset_highlight.gif        |  Bin 168 -> 0 bytes
 .../js/editarea/edit_area/images/save.gif       |  Bin 285 -> 0 bytes
 .../js/editarea/edit_area/images/search.gif     |  Bin 191 -> 0 bytes
 .../edit_area/images/smooth_selection.gif       |  Bin 174 -> 0 bytes
 .../js/editarea/edit_area/images/spacer.gif     |  Bin 43 -> 0 bytes
 .../edit_area/images/statusbar_resize.gif       |  Bin 79 -> 0 bytes
 .../js/editarea/edit_area/images/undo.gif       |  Bin 175 -> 0 bytes
 .../js/editarea/edit_area/images/word_wrap.gif  |  Bin 951 -> 0 bytes
 .../js/editarea/edit_area/keyboard.js           |  145 ---
 .../js/editarea/edit_area/langs/en.js           |   67 -
 .../js/editarea/edit_area/license_apache.txt    |    7 -
 .../js/editarea/edit_area/license_bsd.txt       |   10 -
 .../js/editarea/edit_area/license_lgpl.txt      |  458 -------
 .../js/editarea/edit_area/manage_area.js        |  623 ---------
 .../js/editarea/edit_area/reg_syntax.js         |  166 ---
 .../js/editarea/edit_area/reg_syntax/basic.js   |   69 -
 .../editarea/edit_area/reg_syntax/brainfuck.js  |   44 -
 .../js/editarea/edit_area/reg_syntax/c.js       |   62 -
 .../editarea/edit_area/reg_syntax/coldfusion.js |  119 --
 .../js/editarea/edit_area/reg_syntax/cpp.js     |   65 -
 .../js/editarea/edit_area/reg_syntax/css.js     |   84 --
 .../js/editarea/edit_area/reg_syntax/html.js    |   50 -
 .../js/editarea/edit_area/reg_syntax/java.js    |   56 -
 .../js/editarea/edit_area/reg_syntax/js.js      |   93 --
 .../js/editarea/edit_area/reg_syntax/pas.js     |   82 --
 .../js/editarea/edit_area/reg_syntax/perl.js    |   88 --
 .../js/editarea/edit_area/reg_syntax/php.js     |  156 ---
 .../js/editarea/edit_area/reg_syntax/python.js  |  144 ---
 .../editarea/edit_area/reg_syntax/robotstxt.js  |   24 -
 .../js/editarea/edit_area/reg_syntax/ruby.js    |   67 -
 .../js/editarea/edit_area/reg_syntax/sql.js     |   55 -
 .../js/editarea/edit_area/reg_syntax/tsql.js    |   87 --
 .../js/editarea/edit_area/reg_syntax/vb.js      |   52 -
 .../js/editarea/edit_area/reg_syntax/xml.js     |   56 -
 .../js/editarea/edit_area/regexp.js             |  139 --
 .../js/editarea/edit_area/resize_area.js        |   73 --
 .../js/editarea/edit_area/search_replace.js     |  174 ---
 .../js/editarea/edit_area/template.html         |  117 --
 .../tenant-theme/js/editarea/license_apache.txt |    7 -
 .../tenant-theme/js/editarea/license_bsd.txt    |   10 -
 .../tenant-theme/js/editarea/license_lgpl.txt   |  458 -------
 .../web/tenant-theme/js/editarea/todo.txt       |   71 --
 .../web/tenant-theme/js/theme_resource_util.js  |  828 ------------
 .../resources/web/tenant-theme/logo_mgt.jsp     |  220 ----
 .../web/tenant-theme/metadata_resourcepath.jsp  |  106 --
 .../web/tenant-theme/raw-collection-content.jsp |  755 -----------
 .../rename_resource_ajaxprocessor.jsp           |   41 -
 .../web/tenant-theme/theme_advanced.jsp         |  139 --
 .../resources/web/tenant-theme/theme_mgt.jsp    |  239 ----
 .../tenant-theme/theme_mgt_ajaxprocessor.jsp    |   48 -
 .../web/tenant-theme/update_text_content.jsp    |   51 -
 .../org.wso2.carbon.theme.mgt/2.1.0/pom.xml     |  102 --
 .../TenantThemeMgtServiceComponent.java         |   99 --
 .../theme/mgt/services/ThemeMgtService.java     |  195 ---
 .../theme/mgt/util/ThemeLoadingListener.java    |   73 --
 .../wso2/carbon/theme/mgt/util/ThemeUtil.java   |  302 -----
 .../src/main/resources/META-INF/component.xml   |   29 -
 .../src/main/resources/META-INF/services.xml    |  103 --
 components/stratos/theme-mgt/pom.xml            |   41 -
 .../org.apache.stratos.theme.mgt.stub/pom.xml   |  125 ++
 .../src/main/resources/ThemeMgtService.wsdl     | 1146 +++++++++++++++++
 .../4.1.0/pom.xml                               |  121 --
 .../src/main/resources/ThemeMgtService.wsdl     | 1157 -----------------
 service-stubs/pom.xml                           |    2 +-
 252 files changed, 15604 insertions(+), 15628 deletions(-)
----------------------------------------------------------------------