You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/02/24 16:58:31 UTC

[03/10] incubator-usergrid git commit: Adding a CATALINA_BASE to the rest module so we can configure Tomcat as we need it configured for Maven Surefire testing with Arquillian.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/lib/usergrid-deployment.properties
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/lib/usergrid-deployment.properties b/stack/rest/catalina_base/lib/usergrid-deployment.properties
new file mode 100644
index 0000000..daf7324
--- /dev/null
+++ b/stack/rest/catalina_base/lib/usergrid-deployment.properties
@@ -0,0 +1,113 @@
+#
+# 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.
+#
+
+######################################################
+# Minimal Usergrid configuration properties for local Tomcat and Cassandra
+
+usergrid.test=true
+
+cassandra.url=localhost:9160
+cassandra.cluster=usergrid
+cassandra.keyspace.strategy=org.apache.cassandra.locator.SimpleStrategy
+cassandra.keyspace.replication=replication_factor:1
+#cassandra.keyspace.strategy=org.apache.cassandra.locator.NetworkTopologyStrategy
+#cassandra.keyspace.replication=us-east:3
+
+cassandra.timeout=5000
+cassandra.connections=10
+cassandra.discovery=NONE
+#usergrid.read.cl=ONE
+#usergrid.write.cl=ONE
+
+usergrid.notifications.listener.queueName=notifications/queuelistenerv1_31;notifications/queuelistenerv1_32;notifications/queuelistenerv1_33;notifications/queuelistenerv1_34;notifications/queuelistenerv1_35;notifications/queuelistenerv1_36
+usergrid.notifications.listener.maxThreads=0
+
+
+hystrix.threadpool.graph_user.coreSize=10
+hystrix.threadpool.graph_async.coreSize=10
+
+elasticsearch.cluster_name=elasticsearch
+#elasticsearch.cluster_name=grindrgw-prod
+#elasticsearch.cluster_name=rea1dug001-prod
+elasticsearch.index_prefix=usergrid
+elasticsearch.hosts=127.0.0.1
+elasticsearch.port=9300
+elasticsearch.number_shards=1
+elasticsearch.number_replicas=0
+
+
+######################################################
+# Admin and test user setup
+
+usergrid.sysadmin.login.allowed=true
+usergrid.sysadmin.login.name=superuser
+usergrid.sysadmin.login.password=superuser
+usergrid.sysadmin.login.email=superuser@usergrid.example.com
+
+usergrid.sysadmin.email=superuser@usergrid.example.com
+usergrid.sysadmin.approve.users=false
+usergrid.sysadmin.approve.organizations=false
+
+# Base mailer account - default for all outgoing messages
+usergrid.management.mailer=Admin <ad...@usergrid.example.com>
+
+usergrid.setup-test-account=true
+
+usergrid.test-account.app=test-app
+usergrid.test-account.organization=test-organization
+usergrid.test-account.admin-user.username=test
+usergrid.test-account.admin-user.name=Test User
+usergrid.test-account.admin-user.email=testuser@usergrid.example.com
+usergrid.test-account.admin-user.password=test
+
+######################################################
+# Auto-confirm and sign-up notifications settings
+
+usergrid.management.admin_users_require_confirmation=false
+usergrid.management.admin_users_require_activation=false
+
+usergrid.management.organizations_require_activation=false
+usergrid.management.notify_sysadmin_of_new_organizations=true
+usergrid.management.notify_sysadmin_of_new_admin_users=true
+
+######################################################
+# URLs
+
+# Redirect path when request come in for TLD
+usergrid.redirect_root=http://localhost:8080/status
+
+usergrid.view.management.organizations.organization.activate=http://localhost:8080/accounts/welcome
+usergrid.view.management.organizations.organization.confirm=http://localhost:8080/accounts/welcome
+
+usergrid.view.management.users.user.activate=http://localhost:8080/accounts/welcome
+usergrid.view.management.users.user.confirm=http://localhost:8080/accounts/welcome
+
+usergrid.admin.confirmation.url=http://localhost:8080/management/users/%s/confirm
+usergrid.user.confirmation.url=http://localhost:8080/%s/%s/users/%s/confirm
+
+usergrid.organization.activation.url=http://localhost:8080/management/organizations/%s/activate
+
+usergrid.admin.activation.url=http://localhost:8080/management/users/%s/activate
+usergrid.user.activation.url=http://localhost:8080%s/%s/users/%s/activate
+
+usergrid.admin.resetpw.url=http://localhost:8080/management/users/%s/resetpw
+usergrid.user.resetpw.url=http://localhost:8080/%s/%s/users/%s/resetpw
+
+
+#usergrid.metrics.graphite.host=

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/ROOT
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/ROOT b/stack/rest/catalina_base/webapps/ROOT
new file mode 120000
index 0000000..e92f674
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/ROOT
@@ -0,0 +1 @@
+../../target/ROOT
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/META-INF/context.xml
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/META-INF/context.xml b/stack/rest/catalina_base/webapps/host-manager/META-INF/context.xml
new file mode 100644
index 0000000..3390e96
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/host-manager/META-INF/context.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<Context antiResourceLocking="false" privileged="true" >
+  <!--
+    Remove the comment markers from around the Valve below to limit access to
+    the host-manager application to clients connecting from localhost
+  -->
+  <!--
+  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
+  -->
+</Context>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/401.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/401.jsp b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/401.jsp
new file mode 100644
index 0000000..83c8c6f
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/401.jsp
@@ -0,0 +1,70 @@
+<%--
+  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.
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>401 Unauthorized</title>
+  <style type="text/css">
+    <!--
+    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+    PRE, TT {border: 1px dotted #525D76}
+    A {color : black;}A.name {color : black;}
+    -->
+  </style>
+ </head>
+ <body>
+   <h1>401 Unauthorized</h1>
+   <p>
+    You are not authorized to view this page. If you have not changed
+    any configuration files, please examine the file
+    <tt>conf/tomcat-users.xml</tt> in your installation. That
+    file must contain the credentials to let you use this webapp.
+   </p>
+   <p>
+    For example, to add the <tt>admin-gui</tt> role to a user named
+    <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
+    config file listed above.
+   </p>
+<pre>
+&lt;role rolename="admin-gui"/&gt;
+&lt;user username="tomcat" password="s3cret" roles="admin-gui"/&gt;
+</pre>
+   <p>
+    Note that for Tomcat 7 onwards, the roles required to use the host manager
+    application were changed from the single <tt>admin</tt> role to the
+    following two roles. You will need to assign the role(s) required for
+    the functionality you wish to access.
+   </p>
+    <ul>
+      <li><tt>admin-gui</tt> - allows access to the HTML GUI</li>
+      <li><tt>admin-script</tt> - allows access to the text interface</li>
+    </ul>
+   <p>
+    The HTML interface is protected against CSRF but the text interface is not.
+    To maintain the CSRF protection:
+   </p>
+   <ul>
+    <li>Users with the <tt>admin-gui</tt> role should not be granted the
+       <tt>admin-script</tt> role.</li>
+    <li>If the text interface is accessed through a browser (e.g. for testing
+        since this interface is intended for tools not humans) then the browser
+        must be closed afterwards to terminate the session.</li>
+   </ul>
+ </body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/403.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/403.jsp b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/403.jsp
new file mode 100644
index 0000000..2dbb448
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/403.jsp
@@ -0,0 +1,84 @@
+<%--
+  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.
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>403 Access Denied</title>
+  <style type="text/css">
+    <!--
+    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+    PRE, TT {border: 1px dotted #525D76}
+    A {color : black;}A.name {color : black;}
+    -->
+  </style>
+ </head>
+ <body>
+   <h1>403 Access Denied</h1>
+   <p>
+    You are not authorized to view this page.
+   </p>
+   <p>
+    If you have already configured the Host Manager application to allow access
+    and you have used your browsers back button, used a saved book-mark or
+    similar then you may have triggered the cross-site request forgery (CSRF)
+    protection that has been enabled for the HTML interface of the Host Manager
+    application. You will need to reset this protection by returning to the
+    <a href="<%=request.getContextPath()%>/html">main Host Manager page</a>.
+    Once you return to this page, you will be able to continue using the Host
+    Manager appliction's HTML interface normally. If you continue to see this
+    access denied message, check that you have the necessary permissions to
+    access this application.
+   </p>
+   <p> If you have not changed
+    any configuration files, please examine the file
+    <tt>conf/tomcat-users.xml</tt> in your installation. That
+    file must contain the credentials to let you use this webapp.
+   </p>
+   <p>
+    For example, to add the <tt>admin-gui</tt> role to a user named
+    <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
+    config file listed above.
+   </p>
+<pre>
+&lt;role rolename="admin-gui"/&gt;
+&lt;user username="tomcat" password="s3cret" roles="admin-gui"/&gt;
+</pre>
+   <p>
+    Note that for Tomcat 7 onwards, the roles required to use the host manager
+    application were changed from the single <tt>admin</tt> role to the
+    following two roles. You will need to assign the role(s) required for
+    the functionality you wish to access.
+   </p>
+    <ul>
+      <li><tt>admin-gui</tt> - allows access to the HTML GUI</li>
+      <li><tt>admin-script</tt> - allows access to the text interface</li>
+    </ul>
+   <p>
+    The HTML interface is protected against CSRF but the text interface is not.
+    To maintain the CSRF protection:
+   </p>
+   <ul>
+    <li>Users with the <tt>admin-gui</tt> role should not be granted the
+       <tt>admin-script</tt> role.</li>
+    <li>If the text interface is accessed through a browser (e.g. for testing
+        since this interface is intended for tools not humans) then the browser
+        must be closed afterwards to terminate the session.</li>
+   </ul>
+ </body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/404.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/404.jsp b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/404.jsp
new file mode 100644
index 0000000..d1b5b0b
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/jsp/404.jsp
@@ -0,0 +1,61 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<%@ page import="org.apache.catalina.util.RequestUtil" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>404 Not found</title>
+  <style type="text/css">
+    <!--
+    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+    PRE, TT {border: 1px dotted #525D76}
+    A {color : black;}A.name {color : black;}
+    -->
+  </style>
+ </head>
+ <body>
+   <h1>404 Not found</h1>
+   <p>
+    The page you tried to access
+    (<%=RequestUtil.filter((String) request.getAttribute(
+            "javax.servlet.error.request_uri"))%>)
+    does not exist.
+   </p>
+   <p>
+    The Host Manager application has been re-structured for Tomcat 7 onwards and
+    some URLs have changed. All URLs used to access the Manager application
+    should now start with one of the following options:
+   </p>
+    <ul>
+      <li><%=request.getContextPath()%>/html for the HTML GUI</li>
+      <li><%=request.getContextPath()%>/text for the text interface</li>
+    </ul>
+   <p>
+    Note that the URL for the text interface has changed from
+    &quot;<%=request.getContextPath()%>&quot; to
+    &quot;<%=request.getContextPath()%>/text&quot;.
+   </p>
+   <p>
+    You probably need to adjust the URL you are using to access the Host Manager
+    application. However, there is always a chance you have found a bug in the
+    Host Manager application. If you are sure you have found a bug, and that the
+    bug has not already been reported, please report it to the Apache Tomcat
+    team.
+   </p>
+ </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/WEB-INF/web.xml b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/web.xml
new file mode 100644
index 0000000..30f319b
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/host-manager/WEB-INF/web.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+  version="3.0"
+  metadata-complete="true">
+
+  <display-name>Tomcat Host Manager Application</display-name>
+  <description>
+    A scriptable host management web application for the Tomcat Web Server;
+    Manager lets you view, create and remove virtual hosts.
+  </description>
+
+  <servlet>
+    <servlet-name>HostManager</servlet-name>
+    <servlet-class>org.apache.catalina.manager.host.HostManagerServlet</servlet-class>
+    <init-param>
+      <param-name>debug</param-name>
+      <param-value>2</param-value>
+    </init-param>
+  </servlet>
+  <servlet>
+    <servlet-name>HTMLHostManager</servlet-name>
+    <servlet-class>org.apache.catalina.manager.host.HTMLHostManagerServlet</servlet-class>
+    <init-param>
+      <param-name>debug</param-name>
+      <param-value>2</param-value>
+    </init-param>
+  </servlet>
+
+  <filter>
+    <filter-name>SetCharacterEncoding</filter-name>
+    <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
+    <init-param>
+      <param-name>encoding</param-name>
+      <param-value>UTF-8</param-value>
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>SetCharacterEncoding</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <filter>
+    <filter-name>CSRF</filter-name>
+    <filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class>
+    <init-param>
+      <param-name>entryPoints</param-name>
+      <param-value>/html,/html/,/html/list,/index.jsp</param-value>
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>CSRF</filter-name>
+    <servlet-name>HTMLHostManager</servlet-name>
+  </filter-mapping>
+
+  <!-- Define the Manager Servlet Mapping -->
+  <servlet-mapping>
+    <servlet-name>HostManager</servlet-name>
+    <url-pattern>/text/*</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>HTMLHostManager</servlet-name>
+    <url-pattern>/html/*</url-pattern>
+  </servlet-mapping>
+
+  <!-- Define a Security Constraint on this Application -->
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>HostManager commands</web-resource-name>
+      <url-pattern>/text/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+       <!-- NOTE:  This role is not present in the default users file -->
+       <role-name>admin-script</role-name>
+    </auth-constraint>
+  </security-constraint>
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>HTMLHostManager commands</web-resource-name>
+      <url-pattern>/html/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+       <!-- NOTE:  This role is not present in the default users file -->
+       <role-name>admin-gui</role-name>
+    </auth-constraint>
+  </security-constraint>
+
+  <!-- Define the Login Configuration for this Application -->
+  <login-config>
+    <auth-method>BASIC</auth-method>
+    <realm-name>Tomcat Host Manager Application</realm-name>
+  </login-config>
+
+  <!-- Security roles referenced by this web application -->
+  <security-role>
+    <description>
+      The role that is required to log in to the Host Manager Application HTML
+      interface
+    </description>
+    <role-name>admin-gui</role-name>
+  </security-role>
+  <security-role>
+    <description>
+      The role that is required to log in to the Host Manager Application text
+      interface
+    </description>
+    <role-name>admin-script</role-name>
+  </security-role>
+
+  <error-page>
+    <error-code>401</error-code>
+    <location>/WEB-INF/jsp/401.jsp</location>
+  </error-page>
+  <error-page>
+    <error-code>403</error-code>
+    <location>/WEB-INF/jsp/403.jsp</location>
+  </error-page>
+  <error-page>
+    <error-code>404</error-code>
+    <location>/WEB-INF/jsp/404.jsp</location>
+  </error-page>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/add.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/add.gif b/stack/rest/catalina_base/webapps/host-manager/images/add.gif
new file mode 100644
index 0000000..0774d07
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/add.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/asf-logo.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/asf-logo.gif b/stack/rest/catalina_base/webapps/host-manager/images/asf-logo.gif
new file mode 100644
index 0000000..22eb9d7
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/asf-logo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/code.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/code.gif b/stack/rest/catalina_base/webapps/host-manager/images/code.gif
new file mode 100644
index 0000000..d27307b
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/code.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/design.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/design.gif b/stack/rest/catalina_base/webapps/host-manager/images/design.gif
new file mode 100644
index 0000000..f5db0a9
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/design.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/docs.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/docs.gif b/stack/rest/catalina_base/webapps/host-manager/images/docs.gif
new file mode 100644
index 0000000..d64a4a1
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/docs.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/fix.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/fix.gif b/stack/rest/catalina_base/webapps/host-manager/images/fix.gif
new file mode 100644
index 0000000..d59ad64
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/fix.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/tomcat.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/tomcat.gif b/stack/rest/catalina_base/webapps/host-manager/images/tomcat.gif
new file mode 100644
index 0000000..6175673
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/tomcat.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/update.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/update.gif b/stack/rest/catalina_base/webapps/host-manager/images/update.gif
new file mode 100644
index 0000000..31e22ab
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/update.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/images/void.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/images/void.gif b/stack/rest/catalina_base/webapps/host-manager/images/void.gif
new file mode 100644
index 0000000..e565824
Binary files /dev/null and b/stack/rest/catalina_base/webapps/host-manager/images/void.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/index.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/index.jsp b/stack/rest/catalina_base/webapps/host-manager/index.jsp
new file mode 100644
index 0000000..d4816e5
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/host-manager/index.jsp
@@ -0,0 +1,18 @@
+<%--
+  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.
+--%>
+<% response.sendRedirect(response.encodeRedirectURL(request.getContextPath() +
+        "/html")); %>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/host-manager/manager.xml
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/host-manager/manager.xml b/stack/rest/catalina_base/webapps/host-manager/manager.xml
new file mode 100644
index 0000000..250065a
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/host-manager/manager.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+<!--
+
+    Context configuration file for the Tomcat Manager Web App
+
+-->
+<Context docBase="${catalina.home}/webapps/manager"
+         privileged="true" antiResourceLocking="false" antiJARLocking="false">
+
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/META-INF/context.xml
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/META-INF/context.xml b/stack/rest/catalina_base/webapps/manager/META-INF/context.xml
new file mode 100644
index 0000000..21d9bac
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/META-INF/context.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<Context antiResourceLocking="false" privileged="true" >
+  <!--
+    Remove the comment markers from around the Valve below to limit access to
+    the manager application to clients connecting from localhost
+  -->
+  <!--
+  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
+  -->
+</Context>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/401.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/401.jsp b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/401.jsp
new file mode 100644
index 0000000..01f8aa9
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/401.jsp
@@ -0,0 +1,79 @@
+<%--
+  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.
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>401 Unauthorized</title>
+  <style type="text/css">
+    <!--
+    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+    PRE, TT {border: 1px dotted #525D76}
+    A {color : black;}A.name {color : black;}
+    -->
+  </style>
+ </head>
+ <body>
+   <h1>401 Unauthorized</h1>
+   <p>
+    You are not authorized to view this page. If you have not changed
+    any configuration files, please examine the file
+    <tt>conf/tomcat-users.xml</tt> in your installation. That
+    file must contain the credentials to let you use this webapp.
+   </p>
+   <p>
+    For example, to add the <tt>manager-gui</tt> role to a user named
+    <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
+    config file listed above.
+   </p>
+<pre>
+&lt;role rolename="manager-gui"/&gt;
+&lt;user username="tomcat" password="s3cret" roles="manager-gui"/&gt;
+</pre>
+   <p>
+    Note that for Tomcat 7 onwards, the roles required to use the manager
+    application were changed from the single <tt>manager</tt> role to the
+    following four roles. You will need to assign the role(s) required for
+    the functionality you wish to access.
+   </p>
+    <ul>
+      <li><tt>manager-gui</tt> - allows access to the HTML GUI and the status
+          pages</li>
+      <li><tt>manager-script</tt> - allows access to the text interface and the
+          status pages</li>
+      <li><tt>manager-jmx</tt> - allows access to the JMX proxy and the status
+          pages</li>
+      <li><tt>manager-status</tt> - allows access to the status pages only</li>
+    </ul>
+   <p>
+    The HTML interface is protected against CSRF but the text and JMX interfaces
+    are not. To maintain the CSRF protection:
+   </p>
+   <ul>
+    <li>Users with the <tt>manager-gui</tt> role should not be granted either
+        the <tt>manager-script</tt> or <tt>manager-jmx</tt> roles.</li>
+    <li>If the text or jmx interfaces are accessed through a browser (e.g. for
+        testing since these interfaces are intended for tools not humans) then
+        the browser must be closed afterwards to terminate the session.</li>
+   </ul>
+   <p>
+    For more information - please see the
+    <a href="/docs/manager-howto.html">Manager App HOW-TO</a>.
+   </p>
+ </body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/403.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/403.jsp b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/403.jsp
new file mode 100644
index 0000000..43d960f
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/403.jsp
@@ -0,0 +1,94 @@
+<%--
+  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.
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>403 Access Denied</title>
+  <style type="text/css">
+    <!--
+    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+    PRE, TT {border: 1px dotted #525D76}
+    A {color : black;}A.name {color : black;}
+    -->
+  </style>
+ </head>
+ <body>
+   <h1>403 Access Denied</h1>
+   <p>
+    You are not authorized to view this page.
+   </p>
+   <p>
+    If you have already configured the Manager application to allow access and
+    you have used your browsers back button, used a saved book-mark or similar
+    then you may have triggered the cross-site request forgery (CSRF) protection
+    that has been enabled for the HTML interface of the Manager application. You
+    will need to reset this protection by returning to the
+    <a href="<%=request.getContextPath()%>/html">main Manager page</a>. Once you
+    return to this page, you will be able to continue using the Manager
+    appliction's HTML interface normally. If you continue to see this access
+    denied message, check that you have the necessary permissions to access this
+    application.
+   </p>
+   <p>
+    If you have not changed
+    any configuration files, please examine the file
+    <tt>conf/tomcat-users.xml</tt> in your installation. That
+    file must contain the credentials to let you use this webapp.
+   </p>
+   <p>
+    For example, to add the <tt>manager-gui</tt> role to a user named
+    <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
+    config file listed above.
+   </p>
+<pre>
+&lt;role rolename="manager-gui"/&gt;
+&lt;user username="tomcat" password="s3cret" roles="manager-gui"/&gt;
+</pre>
+   <p>
+    Note that for Tomcat 7 onwards, the roles required to use the manager
+    application were changed from the single <tt>manager</tt> role to the
+    following four roles. You will need to assign the role(s) required for
+    the functionality you wish to access.
+   </p>
+    <ul>
+      <li><tt>manager-gui</tt> - allows access to the HTML GUI and the status
+          pages</li>
+      <li><tt>manager-script</tt> - allows access to the text interface and the
+          status pages</li>
+      <li><tt>manager-jmx</tt> - allows access to the JMX proxy and the status
+          pages</li>
+      <li><tt>manager-status</tt> - allows access to the status pages only</li>
+    </ul>
+   <p>
+    The HTML interface is protected against CSRF but the text and JMX interfaces
+    are not. To maintain the CSRF protection:
+   </p>
+   <ul>
+    <li>Users with the <tt>manager-gui</tt> role should not be granted either
+        the <tt>manager-script</tt> or <tt>manager-jmx</tt> roles.</li>
+    <li>If the text or jmx interfaces are accessed through a browser (e.g. for
+        testing since these interfaces are intended for tools not humans) then
+        the browser must be closed afterwards to terminate the session.</li>
+   </ul>
+   <p>
+    For more information - please see the
+    <a href="/docs/manager-howto.html">Manager App HOW-TO</a>.
+   </p>
+ </body>
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/404.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/404.jsp b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/404.jsp
new file mode 100644
index 0000000..86d4f35
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/404.jsp
@@ -0,0 +1,62 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<%@ page import="org.apache.catalina.util.RequestUtil" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+  <title>404 Not found</title>
+  <style type="text/css">
+    <!--
+    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
+    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+    PRE, TT {border: 1px dotted #525D76}
+    A {color : black;}A.name {color : black;}
+    -->
+  </style>
+ </head>
+ <body>
+   <h1>404 Not found</h1>
+   <p>
+    The page you tried to access
+    (<%=RequestUtil.filter((String) request.getAttribute(
+            "javax.servlet.error.request_uri"))%>)
+    does not exist.
+   </p>
+   <p>
+    The Manager application has been re-structured for Tomcat 7 onwards and some
+    of URLs have changed. All URLs used to access the Manager application should
+    now start with one of the following options:
+   </p>
+    <ul>
+      <li><%=request.getContextPath()%>/html for the HTML GUI</li>
+      <li><%=request.getContextPath()%>/text for the text interface</li>
+      <li><%=request.getContextPath()%>/jmxproxy for the JMX proxy</li>
+      <li><%=request.getContextPath()%>/status for the status pages</li>
+    </ul>
+   <p>
+    Note that the URL for the text interface has changed from
+    &quot;<%=request.getContextPath()%>&quot; to
+    &quot;<%=request.getContextPath()%>/text&quot;.
+   </p>
+   <p>
+    You probably need to adjust the URL you are using to access the Manager
+    application. However, there is always a chance you have found a bug in the
+    Manager application. If you are sure you have found a bug, and that the bug
+    has not already been reported, please report it to the Apache Tomcat team.
+   </p>
+ </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionDetail.jsp b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
new file mode 100644
index 0000000..9362dab
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<%--
+ 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 session="false" contentType="text/html; charset=ISO-8859-1" %>
+<%@page import="java.util.Enumeration" %>
+<%@page import="javax.servlet.http.HttpSession" %>
+<%@page import="org.apache.catalina.Session" %>
+<%@page import="org.apache.catalina.manager.JspHelper" %>
+<%@page import="org.apache.catalina.util.ContextName" %>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%--!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"--%>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<% String path = (String) request.getAttribute("path");
+   String version = (String) request.getAttribute("version");
+   ContextName cn = new ContextName(path, version);
+   Session currentSession = (Session)request.getAttribute("currentSession");
+   String currentSessionId = null;
+   HttpSession currentHttpSession = null;
+   if (currentSession != null) {
+       currentHttpSession = currentSession.getSession();
+       currentSessionId = JspHelper.escapeXml(currentSession.getId());
+   } else {
+       currentSessionId = "Session invalidated";
+   }
+   String submitUrl = JspHelper.escapeXml(response.encodeURL(
+           ((HttpServletRequest) pageContext.getRequest()).getRequestURI() +
+           "?path=" + path + "&version=" + version));
+%>
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+    <meta http-equiv="pragma" content="no-cache"/><!-- HTTP 1.0 -->
+    <meta http-equiv="cache-control" content="no-cache,must-revalidate"/><!-- HTTP 1.1 -->
+    <meta http-equiv="expires" content="0"/><!-- 0 is an invalid value and should be treated as 'now' -->
+    <meta http-equiv="content-language" content="en"/>
+    <meta name="author" content="Cedrik LIME"/>
+    <meta name="copyright" content="copyright 2005-2015 the Apache Software Foundation"/>
+    <meta name="robots" content="noindex,nofollow,noarchive"/>
+    <title>Sessions Administration: details for <%= currentSessionId %></title>
+</head>
+<body>
+<% if (currentHttpSession == null) { %>
+   <h1><%=currentSessionId%></h1>
+<% } else { %>
+   <h1>Details for Session <%= currentSessionId %></h1>
+
+   <table style="text-align: left;" border="0">
+     <tr>
+       <th>Session Id</th>
+       <td><%= currentSessionId %></td>
+     </tr>
+     <tr>
+       <th>Guessed Locale</th>
+       <td><%= JspHelper.guessDisplayLocaleFromSession(currentSession) %></td>
+     </tr>
+     <tr>
+       <th>Guessed User</th>
+       <td><%= JspHelper.guessDisplayUserFromSession(currentSession) %></td>
+     </tr>
+     <tr>
+       <th>Creation Time</th>
+       <td><%= JspHelper.getDisplayCreationTimeForSession(currentSession) %></td>
+     </tr>
+     <tr>
+       <th>Last Accessed Time</th>
+       <td><%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %></td>
+     </tr>
+     <tr>
+       <th>Session Max Inactive Interval</th>
+       <td><%= JspHelper.secondsToTimeString(currentSession.getMaxInactiveInterval()) %></td>
+     </tr>
+     <tr>
+       <th>Used Time</th>
+       <td><%= JspHelper.getDisplayUsedTimeForSession(currentSession) %></td>
+     </tr>
+     <tr>
+       <th>Inactive Time</th>
+       <td><%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %></td>
+     </tr>
+     <tr>
+       <th>TTL</th>
+       <td><%= JspHelper.getDisplayTTLForSession(currentSession) %></td>
+     </tr>
+   </table>
+
+   <form method="post" action="<%= submitUrl %>">
+     <div>
+       <input type="hidden" name="sessionId" value="<%= currentSessionId %>" />
+       <input type="hidden" name="action" value="sessionDetail" />
+       <%
+       if ("Primary".equals(request.getParameter("sessionType"))) {
+       %>
+         <input type="hidden" name="sessionType" value="Primary" />
+       <%
+       }
+       %>    <input type="submit" value="Refresh" />
+     </div>
+   </form>
+
+   <div class="error"><%= JspHelper.escapeXml(request.getAttribute("error")) %></div>
+   <div class="message"><%= JspHelper.escapeXml(request.getAttribute("message")) %></div>
+
+   <table style="text-align: left;" border="1" cellpadding="2" cellspacing="2">
+   <% int nAttributes = 0;
+      Enumeration attributeNamesEnumeration = currentHttpSession.getAttributeNames();
+      while (attributeNamesEnumeration.hasMoreElements()) {
+          attributeNamesEnumeration.nextElement();
+          ++nAttributes;
+      }
+   %>
+       <caption style="font-variant: small-caps;"><%= JspHelper.formatNumber(nAttributes) %> attributes</caption>
+       <thead>
+           <tr>
+               <th>Remove Attribute</th>
+               <th>Attribute name</th>
+               <th>Attribute value</th>
+           </tr>
+       </thead>
+       <%--tfoot>
+           <tr>
+               <td colspan="3" style="text-align: center;">
+                   TODO: set Max Inactive Interval on sessions
+               </td>
+           </tr>
+       </tfoot--%>
+       <tbody>
+   <% attributeNamesEnumeration = currentHttpSession.getAttributeNames();
+      while (attributeNamesEnumeration.hasMoreElements()) {
+          String attributeName = (String) attributeNamesEnumeration.nextElement();
+   %>
+           <tr>
+               <td align="center">
+                   <form method="post" action="<%= submitUrl %>">
+                       <div>
+                           <input type="hidden" name="action" value="removeSessionAttribute" />
+                           <input type="hidden" name="sessionId" value="<%= currentSessionId %>" />
+                           <input type="hidden" name="attributeName" value="<%= JspHelper.escapeXml(attributeName) %>" />
+                           <%
+                             if ("Primary".equals(request.getParameter("sessionType"))) {
+                           %>
+                             <input type="submit" value="Remove" />
+                             <input type="hidden" name="sessionType" value="Primary" />
+                           <%
+                             } else {
+                               out.print("Primary sessions only");
+                             }
+                           %>
+                       </div>
+                   </form>
+               </td>
+               <td><%= JspHelper.escapeXml(attributeName) %></td>
+               <td><% Object attributeValue = currentHttpSession.getAttribute(attributeName); %><span title="<%= attributeValue == null ? "" : attributeValue.getClass().toString() %>"><%= JspHelper.escapeXml(attributeValue) %></span></td>
+           </tr>
+   <% } // end while %>
+       </tbody>
+   </table>
+<% } // endif%>
+
+<form method="post" action="<%=submitUrl%>">
+  <p style="text-align: center;">
+    <input type="submit" value="Return to session list" />
+  </p>
+</form>
+
+<%--div style="display: none;">
+<p>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-html401"
+        alt="Valid HTML 4.01!" height="31" width="88"></a>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-xhtml10"
+        alt="Valid XHTML 1.0!" height="31" width="88" /></a>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-xhtml11"
+        alt="Valid XHTML 1.1!" height="31" width="88" /></a>
+</p>
+</div--%>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionsList.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionsList.jsp b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionsList.jsp
new file mode 100644
index 0000000..1cbf75e
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/WEB-INF/jsp/sessionsList.jsp
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<%--
+ 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 session="false" contentType="text/html; charset=ISO-8859-1" %>
+<%@page import="java.util.Collection" %>
+<%@page import="java.util.Iterator" %>
+<%@page import="org.apache.catalina.manager.JspHelper" %>
+<%@page import="org.apache.catalina.Session" %>
+<%@page import="org.apache.catalina.ha.session.DeltaSession" %>
+<%@page import="org.apache.catalina.util.ContextName" %>
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<%@page import="org.apache.catalina.manager.DummyProxySession"%><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<% String path = (String) request.getAttribute("path");
+   String version = (String) request.getAttribute("version");
+   ContextName cn = new ContextName(path, version);
+   String submitUrl = JspHelper.escapeXml(response.encodeURL(
+           ((HttpServletRequest) pageContext.getRequest()).getRequestURI() +
+           "?path=" + path + "&version=" + version));
+   Collection activeSessions = (Collection) request.getAttribute("activeSessions");
+%>
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
+    <meta http-equiv="pragma" content="no-cache"/><!-- HTTP 1.0 -->
+    <meta http-equiv="cache-control" content="no-cache,must-revalidate"/><!-- HTTP 1.1 -->
+    <meta http-equiv="expires" content="0"/><!-- 0 is an invalid value and should be treated as 'now' -->
+    <meta http-equiv="content-language" content="en"/>
+    <meta name="author" content="Cedrik LIME"/>
+    <meta name="copyright" content="copyright 2005-2015 the Apache Software Foundation"/>
+    <meta name="robots" content="noindex,nofollow,noarchive"/>
+    <title>Sessions Administration for <%= JspHelper.escapeXml(cn.getDisplayName()) %></title>
+</head>
+<body>
+<h1>Sessions Administration for <%= JspHelper.escapeXml(cn.getDisplayName()) %></h1>
+
+<p>Tips:</p>
+<ul>
+    <li>Click on a column to sort.</li>
+    <li>To view a session details and/or remove a session attributes, click on its id.</li>
+</ul>
+
+<div class="error"><%= JspHelper.escapeXml(request.getAttribute("error")) %></div>
+<div class="message"><%= JspHelper.escapeXml(request.getAttribute("message")) %></div>
+
+<form action="<%= submitUrl %>" method="post" id="sessionsForm">
+    <fieldset><legend>Active HttpSessions informations</legend>
+        <input type="hidden" name="action" id="sessionsFormAction" value="injectSessions"/>
+        <input type="hidden" name="sort" id="sessionsFormSort" value="<%= JspHelper.escapeXml(request.getAttribute("sort")) %>"/>
+        <% String order = (String) request.getAttribute("order");
+           if (order == null || "".equals(order)) {
+               order = "ASC";
+           }
+        %>
+        <input type="hidden" name="order" id="sessionsFormSortOrder" value="<%= JspHelper.escapeXml(order) %>"/>
+        <input type="submit" name="refresh" id="refreshButton" value="Refresh Sessions list" onclick="document.getElementById('sessionsFormAction').value='refreshSessions'; return true;"/>
+        <%= JspHelper.formatNumber(activeSessions.size()) %> active Sessions<br/>
+        <table border="1" cellpadding="2" cellspacing="2" width="100%">
+            <thead>
+                <tr>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Session Id</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Type</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='locale'; document.getElementById('refreshButton').click(); return true;">Guessed Locale</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='user'; document.getElementById('refreshButton').click(); return true;">Guessed User name</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='CreationTime'; document.getElementById('refreshButton').click(); return true;">Creation Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='LastAccessedTime'; document.getElementById('refreshButton').click(); return true;">Last Accessed Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='UsedTime'; document.getElementById('refreshButton').click(); return true;">Used Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='InactiveTime'; document.getElementById('refreshButton').click(); return true;">Inactive Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='TTL'; document.getElementById('refreshButton').click(); return true;"><span title="Time To Live">TTL</span></a></th>
+                </tr>
+            </thead>
+            <% if (activeSessions.size() > 10) { %>
+            <tfoot><%-- <tfoot> is the same as <thead> --%>
+                <tr>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Session Id</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Type</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='locale'; document.getElementById('refreshButton').click(); return true;">Guessed Locale</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='user'; document.getElementById('refreshButton').click(); return true;">Guessed User name</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='CreationTime'; document.getElementById('refreshButton').click(); return true;">Creation Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='LastAccessedTime'; document.getElementById('refreshButton').click(); return true;">Last Accessed Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='UsedTime'; document.getElementById('refreshButton').click(); return true;">Used Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='InactiveTime'; document.getElementById('refreshButton').click(); return true;">Inactive Time</a></th>
+                    <th><a onclick="document.getElementById('sessionsFormSort').value='TTL'; document.getElementById('refreshButton').click(); return true;"><span title="Time To Live">TTL</span></a></th>
+                </tr>
+            </tfoot>
+            <% } // end if %>
+            <tbody>
+<% Iterator iter = activeSessions.iterator();
+   while (iter.hasNext()) {
+       Session currentSession = (Session) iter.next();
+       String currentSessionId = JspHelper.escapeXml(currentSession.getId());
+       String type;
+       if (currentSession instanceof DeltaSession) {
+           if (((DeltaSession) currentSession).isPrimarySession()) {
+               type = "Primary";
+           } else {
+               type = "Backup";
+           }
+       } else if (currentSession instanceof DummyProxySession) {
+           type = "Proxy";
+       } else {
+           type = "Primary";
+       }
+%>
+                <tr>
+                    <td><input type="checkbox" name="sessionIds" value="<%= currentSessionId %>" />
+                      <%
+                        if ("Proxy".equals(type)) {
+                            out.print(currentSessionId);
+                        } else {
+                      %>
+                      <a href="<%= submitUrl %>&amp;action=sessionDetail&amp;sessionId=<%= currentSessionId %>&amp;sessionType=<%= type %>"><%= currentSessionId %></a>
+                      <%
+                        }
+                      %>
+                    </td>
+                    <td style="text-align: center;"><%= type %></td>
+                    <td style="text-align: center;"><%= JspHelper.guessDisplayLocaleFromSession(currentSession) %></td>
+                    <td style="text-align: center;"><%= JspHelper.guessDisplayUserFromSession(currentSession) %></td>
+                    <td style="text-align: center;"><%= JspHelper.getDisplayCreationTimeForSession(currentSession) %></td>
+                    <td style="text-align: center;"><%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %></td>
+                    <td style="text-align: center;"><%= JspHelper.getDisplayUsedTimeForSession(currentSession) %></td>
+                    <td style="text-align: center;"><%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %></td>
+                    <td style="text-align: center;"><%= JspHelper.getDisplayTTLForSession(currentSession) %></td>
+                </tr>
+<% } // end while %>
+            </tbody>
+        </table>
+        <p style="text-align: center;">
+            <input type="submit" name="invalidate" value="Invalidate selected Sessions" onclick="document.getElementById('sessionsFormAction').value='invalidateSessions'; return true;"/>
+        </p>
+    </fieldset>
+</form>
+
+<form method="get" action="<%=request.getContextPath()%>/html">
+  <p style="text-align: center;">
+    <input type="submit" value="Return to main page" />
+  </p>
+</form>
+
+<%--div style="display: none;">
+<p>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-html401"
+        alt="Valid HTML 4.01!" height="31" width="88"></a>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-xhtml10"
+        alt="Valid XHTML 1.0!" height="31" width="88" /></a>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-xhtml11"
+        alt="Valid XHTML 1.1!" height="31" width="88" /></a>
+</p>
+</div--%>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/WEB-INF/web.xml b/stack/rest/catalina_base/webapps/manager/WEB-INF/web.xml
new file mode 100644
index 0000000..8fb7728
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/WEB-INF/web.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+  version="3.0"
+  metadata-complete="true">
+
+  <display-name>Tomcat Manager Application</display-name>
+  <description>
+    A scriptable management web application for the Tomcat Web Server;
+    Manager lets you view, load/unload/etc particular web applications.
+  </description>
+
+  <servlet>
+    <servlet-name>Manager</servlet-name>
+    <servlet-class>org.apache.catalina.manager.ManagerServlet</servlet-class>
+    <init-param>
+      <param-name>debug</param-name>
+      <param-value>2</param-value>
+    </init-param>
+  </servlet>
+  <servlet>
+    <servlet-name>HTMLManager</servlet-name>
+    <servlet-class>org.apache.catalina.manager.HTMLManagerServlet</servlet-class>
+    <init-param>
+      <param-name>debug</param-name>
+      <param-value>2</param-value>
+    </init-param>
+    <!-- Uncomment this to show proxy sessions from the Backup manager or a
+         StoreManager in the sessions list for an application
+    <init-param>
+      <param-name>showProxySessions</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    -->
+    <multipart-config>
+      <!-- 50MB max -->
+      <max-file-size>52428800</max-file-size>
+      <max-request-size>52428800</max-request-size>
+      <file-size-threshold>0</file-size-threshold>
+    </multipart-config>
+  </servlet>
+  <servlet>
+    <servlet-name>Status</servlet-name>
+    <servlet-class>org.apache.catalina.manager.StatusManagerServlet</servlet-class>
+    <init-param>
+      <param-name>debug</param-name>
+      <param-value>0</param-value>
+    </init-param>
+  </servlet>
+
+  <servlet>
+    <servlet-name>JMXProxy</servlet-name>
+    <servlet-class>org.apache.catalina.manager.JMXProxyServlet</servlet-class>
+  </servlet>
+
+  <!-- Define the Manager Servlet Mapping -->
+  <servlet-mapping>
+    <servlet-name>Manager</servlet-name>
+      <url-pattern>/text/*</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>Status</servlet-name>
+    <url-pattern>/status/*</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>JMXProxy</servlet-name>
+      <url-pattern>/jmxproxy/*</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>HTMLManager</servlet-name>
+    <url-pattern>/html/*</url-pattern>
+  </servlet-mapping>
+
+  <filter>
+    <filter-name>SetCharacterEncoding</filter-name>
+    <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
+    <init-param>
+      <param-name>encoding</param-name>
+      <param-value>UTF-8</param-value>
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>SetCharacterEncoding</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <filter>
+    <filter-name>CSRF</filter-name>
+    <filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class>
+    <init-param>
+      <param-name>entryPoints</param-name>
+      <param-value>/html,/html/,/html/list,/index.jsp</param-value>
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>CSRF</filter-name>
+    <servlet-name>HTMLManager</servlet-name>
+    <servlet-name>jsp</servlet-name>
+  </filter-mapping>
+
+  <!-- Define a Security Constraint on this Application -->
+  <!-- NOTE:  None of these roles are present in the default users file -->
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>HTML Manager interface (for humans)</web-resource-name>
+      <url-pattern>/html/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+       <role-name>manager-gui</role-name>
+    </auth-constraint>
+  </security-constraint>
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Text Manager interface (for scripts)</web-resource-name>
+      <url-pattern>/text/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+       <role-name>manager-script</role-name>
+    </auth-constraint>
+  </security-constraint>
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>JMX Proxy interface</web-resource-name>
+      <url-pattern>/jmxproxy/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+       <role-name>manager-jmx</role-name>
+    </auth-constraint>
+  </security-constraint>
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Status interface</web-resource-name>
+      <url-pattern>/status/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+       <role-name>manager-gui</role-name>
+       <role-name>manager-script</role-name>
+       <role-name>manager-jmx</role-name>
+       <role-name>manager-status</role-name>
+    </auth-constraint>
+  </security-constraint>
+
+  <!-- Define the Login Configuration for this Application -->
+  <login-config>
+    <auth-method>BASIC</auth-method>
+    <realm-name>Tomcat Manager Application</realm-name>
+  </login-config>
+
+  <!-- Security roles referenced by this web application -->
+  <security-role>
+    <description>
+      The role that is required to access the HTML Manager pages
+    </description>
+    <role-name>manager-gui</role-name>
+  </security-role>
+  <security-role>
+    <description>
+      The role that is required to access the text Manager pages
+    </description>
+    <role-name>manager-script</role-name>
+  </security-role>
+  <security-role>
+    <description>
+      The role that is required to access the HTML JMX Proxy
+    </description>
+    <role-name>manager-jmx</role-name>
+  </security-role>
+  <security-role>
+    <description>
+      The role that is required to access to the Manager Status pages
+    </description>
+    <role-name>manager-status</role-name>
+  </security-role>
+
+  <error-page>
+    <error-code>401</error-code>
+    <location>/WEB-INF/jsp/401.jsp</location>
+  </error-page>
+  <error-page>
+    <error-code>403</error-code>
+    <location>/WEB-INF/jsp/403.jsp</location>
+  </error-page>
+  <error-page>
+    <error-code>404</error-code>
+    <location>/WEB-INF/jsp/404.jsp</location>
+  </error-page>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/add.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/add.gif b/stack/rest/catalina_base/webapps/manager/images/add.gif
new file mode 100644
index 0000000..0774d07
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/add.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/asf-logo.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/asf-logo.gif b/stack/rest/catalina_base/webapps/manager/images/asf-logo.gif
new file mode 100644
index 0000000..22eb9d7
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/asf-logo.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/code.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/code.gif b/stack/rest/catalina_base/webapps/manager/images/code.gif
new file mode 100644
index 0000000..d27307b
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/code.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/design.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/design.gif b/stack/rest/catalina_base/webapps/manager/images/design.gif
new file mode 100644
index 0000000..f5db0a9
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/design.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/docs.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/docs.gif b/stack/rest/catalina_base/webapps/manager/images/docs.gif
new file mode 100644
index 0000000..d64a4a1
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/docs.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/fix.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/fix.gif b/stack/rest/catalina_base/webapps/manager/images/fix.gif
new file mode 100644
index 0000000..d59ad64
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/fix.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/tomcat.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/tomcat.gif b/stack/rest/catalina_base/webapps/manager/images/tomcat.gif
new file mode 100644
index 0000000..f2aa6f8
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/tomcat.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/update.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/update.gif b/stack/rest/catalina_base/webapps/manager/images/update.gif
new file mode 100644
index 0000000..31e22ab
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/update.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/images/void.gif
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/images/void.gif b/stack/rest/catalina_base/webapps/manager/images/void.gif
new file mode 100644
index 0000000..e565824
Binary files /dev/null and b/stack/rest/catalina_base/webapps/manager/images/void.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/index.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/index.jsp b/stack/rest/catalina_base/webapps/manager/index.jsp
new file mode 100644
index 0000000..d4816e5
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/index.jsp
@@ -0,0 +1,18 @@
+<%--
+  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.
+--%>
+<% response.sendRedirect(response.encodeRedirectURL(request.getContextPath() +
+        "/html")); %>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/status.xsd
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/status.xsd b/stack/rest/catalina_base/webapps/manager/status.xsd
new file mode 100644
index 0000000..5af979d
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/status.xsd
@@ -0,0 +1,84 @@
+<?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.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+    <xs:element name="status">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="jvm" type="jvm"/>
+                <xs:element name="connector" type="connector" minOccurs="1" maxOccurs="unbounded"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="connector">
+        <xs:sequence>
+            <xs:element name="threadInfo" type="threadInfo"/>
+            <xs:element name="requestInfo" type="requestInfo"/>
+            <xs:element name="workers" type="workers"/>
+        </xs:sequence>
+        <xs:attribute name="name" type="xs:string" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="jvm">
+        <xs:sequence>
+            <xs:element name="memory" type="memory"/>
+            <xs:element name="memorypool" type="memorypool" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="memory">
+        <xs:attribute name="free" type="xs:long" use="required"/>
+        <xs:attribute name="total" type="xs:long" use="required"/>
+        <xs:attribute name="max" type="xs:long" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="memorypool">
+        <xs:attribute name="name" type="xs:string" use="required"/>
+        <xs:attribute name="type" type="xs:string" use="required"/>
+        <xs:attribute name="usageInit" type="xs:long" use="required"/>
+        <xs:attribute name="usageCommitted" type="xs:long" use="required"/>
+        <xs:attribute name="usageMax" type="xs:long" use="required"/>
+        <xs:attribute name="usageUsed" type="xs:long" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="requestInfo">
+        <xs:attribute name="maxTime" type="xs:long" use="required"/>
+        <xs:attribute name="processingTime" type="xs:int" use="required"/>
+        <xs:attribute name="requestCount" type="xs:long" use="required"/>
+        <xs:attribute name="errorCount" type="xs:long" use="required"/>
+        <xs:attribute name="bytesReceived" type="xs:long" use="required"/>
+        <xs:attribute name="bytesSent" type="xs:long" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="threadInfo">
+        <xs:attribute name="maxThreads" type="xs:int" use="required"/>
+        <xs:attribute name="currentThreadCount" type="xs:int" use="required"/>
+        <xs:attribute name="currentThreadsBusy" type="xs:int" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="worker">
+        <xs:attribute name="stage" type="xs:string" use="required"/>
+        <xs:attribute name="requestProcessingTime" type="xs:int" use="required"/>
+        <xs:attribute name="requestBytesSent" type="xs:long" use="required"/>
+        <xs:attribute name="requestBytesReceived" type="xs:long" use="required"/>
+        <xs:attribute name="remoteAddr" type="xs:string" use="required"/>
+        <xs:attribute name="virtualHost" type="xs:string" use="required"/>
+        <xs:attribute name="method" type="xs:string" use="required"/>
+        <xs:attribute name="currentUri" type="xs:string" use="required"/>
+        <xs:attribute name="currentQueryString" type="xs:string" use="required"/>
+        <xs:attribute name="protocol" type="xs:string" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="workers">
+        <xs:sequence>
+            <xs:element name="worker" type="worker" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+</xs:schema>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/manager/xform.xsl
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/manager/xform.xsl b/stack/rest/catalina_base/webapps/manager/xform.xsl
new file mode 100644
index 0000000..b07fcb9
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/manager/xform.xsl
@@ -0,0 +1,125 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <!-- Output method -->
+  <xsl:output encoding="iso-8859-1"
+              indent="no"/>
+
+  <xsl:template match="status">
+    <html>
+    <head>
+        <TITLE>Tomcat Status</TITLE>
+        <STYLE type="text/css">
+            body, table, tr, td, a, div, span {
+                vertical-align : top;
+            }
+        </STYLE>
+    </head>
+    <body>
+      <div style='font-size:20px;'>Tomcat Status</div>
+
+      <xsl:apply-templates select="jvm"/>
+      <xsl:apply-templates select="connector"/>
+     </body>
+    </html>
+  </xsl:template>
+
+  <xsl:template match="jvm">
+   <xsl:apply-templates select="memory"/>
+   <b>Memory Pools</b><br />
+   <xsl:apply-templates select="memorypool"/>
+   <hr />
+  </xsl:template>
+
+  <xsl:template match="memory">
+    <table><tr>
+             <td><b>JVM:</b></td>
+             <td><b>free:</b> <xsl:value-of select="@free"/></td>
+             <td><b>total:</b> <xsl:value-of select="@total"/></td>
+             <td><b>max:</b> <xsl:value-of select="@max"/></td>
+           </tr>
+    </table><hr />
+  </xsl:template>
+
+  <xsl:template match="memorypool">
+    <table><tr>
+             <td><b>Name:</b> <xsl:value-of select="@name"/></td>
+             <td><b>Type:</b> <xsl:value-of select="@type"/></td>
+             <td><b>Initial:</b> <xsl:value-of select="@usageInit"/></td>
+             <td><b>Committed:</b> <xsl:value-of select="@usageCommitted"/></td>
+             <td><b>Maximum:</b> <xsl:value-of select="@usageMax"/></td>
+             <td><b>Used:</b> <xsl:value-of select="@usageUsed"/></td>
+           </tr>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="connector">
+     <b>Connector -- </b> <xsl:value-of select="@name"/><br />
+
+      <xsl:apply-templates select="threadInfo"/>
+      <xsl:apply-templates select="requestInfo"/>
+      <xsl:apply-templates select="workers"/>
+  </xsl:template>
+
+  <xsl:template match="threadInfo">
+    <table><tr>
+             <td><b>threadInfo</b></td>
+             <td><b>maxThreads:</b> <xsl:value-of select="@maxThreads"/></td>
+             <td><b>currentThreadCount:</b> <xsl:value-of select="@currentThreadCount"/></td>
+             <td><b>currentThreadsBusy:</b> <xsl:value-of select="@currentThreadsBusy"/></td>
+           </tr>
+    </table><hr />
+  </xsl:template>
+
+  <xsl:template match="requestInfo">
+    <table><tr>
+             <td><b>requestInfo </b></td>
+             <td><b>maxTime:</b> <xsl:value-of select="@maxTime"/></td>
+             <td><b>processingTime:</b> <xsl:value-of select="@processingTime"/></td>
+             <td><b>requestCount:</b> <xsl:value-of select="@requestCount"/></td>
+             <td><b>errorCount:</b> <xsl:value-of select="@errorCount"/></td>
+             <td><b>bytesReceived:</b> <xsl:value-of select="@bytesReceived"/></td>
+             <td><b>bytesSent:</b> <xsl:value-of select="@bytesSent"/></td>
+           </tr>
+    </table><hr />
+  </xsl:template>
+
+  <xsl:template match="workers">
+   <table>
+    <tr><th>Stage</th><th>Time</th><th>B Sent</th><th>B Recv</th><th>Client</th><th>VHost</th><th>Request</th></tr>
+      <xsl:apply-templates select="worker"/>
+
+   </table><hr />
+  </xsl:template>
+
+  <xsl:template match="worker">
+   <tr>
+    <td><xsl:value-of select="@stage"/></td>
+    <td><xsl:value-of select="@requestProcessingTime"/></td>
+    <td><xsl:value-of select="@requestBytesSent"/></td>
+    <td><xsl:value-of select="@requestBytesReceived"/></td>
+    <td><xsl:value-of select="@remoteAddr"/></td>
+    <td><xsl:value-of select="@virtualHost"/></td>
+    <td><xsl:value-of select="@method"/> <xsl:value-of select="@currentUri"/>?<xsl:value-of select="@currentQueryString"/> <xsl:value-of select="@protocol"/></td>
+   </tr>
+  </xsl:template>
+
+</xsl:stylesheet>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/13da256f/stack/rest/catalina_base/webapps/portal
----------------------------------------------------------------------
diff --git a/stack/rest/catalina_base/webapps/portal b/stack/rest/catalina_base/webapps/portal
new file mode 120000
index 0000000..b88a900
--- /dev/null
+++ b/stack/rest/catalina_base/webapps/portal
@@ -0,0 +1 @@
+../../../../portal/
\ No newline at end of file