<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- 
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>

  <display-name>Geronimo Administration Console Portal Driver</display-name>

  <!--<context-param>-->
    <!--<param-name>contextConfigLocation</param-name>-->
    <!--<param-value>/WEB-INF/pluto-portal-driver-services-config.xml</param-value>-->
  <!--</context-param>-->

  <!-- XSS/XSRF filter -->
  <filter>
    <filter-name>XSSXSRFFilter</filter-name>
    <filter-class>org.apache.geronimo.console.filter.XSSXSRFFilter</filter-class>
    <init-param>
       <param-name>xsrf.ignorePaths</param-name>
       <param-value>/dojo/dojo/resources/blank.html</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>XSSXSRFFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <listener>
    <listener-class>org.apache.geronimo.console.filter.XSSXSRFFilter</listener-class>
  </listener>

  <!--<listener>-->
    <!--<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>-->
  <!--</listener>-->

  <listener>
    <listener-class>org.apache.geronimo.pluto.PortalStartupListener</listener-class>
  </listener>
  
  <filter>
    <filter-name>PlutoURLRebuildFilter</filter-name>
    <filter-class>org.apache.geronimo.console.filter.PlutoURLRebuildFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>PlutoURLRebuildFilter</filter-name>
    <url-pattern>/portal/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>PlutoURLRebuildFilter</filter-name>
    <url-pattern>/secure/*</url-pattern>
  </filter-mapping>
  
  <filter>
    <filter-name>RedirectByHashFilter</filter-name>
    <filter-class>org.apache.geronimo.console.filter.RedirectByHashFilter</filter-class>
  </filter>
  
  <filter-mapping>
    <filter-name>RedirectByHashFilter</filter-name>
    <url-pattern>/portal/*</url-pattern>
  </filter-mapping>
  
  <servlet>
    <servlet-name>plutoPortalDriver</servlet-name>
    <display-name>Pluto Portal Driver</display-name>
    <description>Pluto Portal Driver Controller</description>
    <servlet-class>org.apache.pluto.driver.PortalDriverServlet</servlet-class>
  </servlet>

  <servlet>
    <servlet-name>plutoPortalDriverLogout</servlet-name>
    <display-name>Pluto Portal Driver</display-name>
    <description>Pluto Portal Driver Logout</description>
    <servlet-class>org.apache.pluto.driver.PortalDriverLogoutServlet</servlet-class>
  </servlet>

  <!-- DWR for the base console portlets -->
  <servlet>
    <display-name>DWR Forward Servlet</display-name>
    <servlet-name>dwr-forward</servlet-name>
    <servlet-class>org.apache.geronimo.console.servlet.ContextForwardServlet</servlet-class>
    <init-param>
       <param-name>servlet-path</param-name>
       <param-value>/dwr</param-value>
    </init-param>
    <init-param>
       <param-name>context-path</param-name>
       <param-value>/console-base</param-value>
    </init-param>
  </servlet>

  <!-- DWR for the debug views portlets -->
  <servlet>
    <display-name>DWR Forward Servlet 2</display-name>
    <servlet-name>dwr-forward2</servlet-name>
    <servlet-class>org.apache.geronimo.console.servlet.ContextForwardServlet</servlet-class>
    <init-param>
       <param-name>servlet-path</param-name>
       <param-value>/dwr2</param-value>
    </init-param>
    <init-param>
       <param-name>context-path</param-name>
       <param-value>/debug-views</param-value>
    </init-param>
  </servlet>

  <!-- DWR for the system database portlets -->
  <servlet>
    <display-name>DWR Forward Servlet 3</display-name>
    <servlet-name>dwr-forward3</servlet-name>
    <servlet-class>org.apache.geronimo.console.servlet.ContextForwardServlet</servlet-class>
    <init-param>
       <param-name>servlet-path</param-name>
       <param-value>/dwr3</param-value>
    </init-param>
    <init-param>
       <param-name>context-path</param-name>
       <param-value>/system-database</param-value>
    </init-param>
  </servlet>

  <!-- DWR for the plugin portlets -->
  <servlet>
    <display-name>DWR Forward Servlet 4</display-name>
    <servlet-name>dwr-forward4</servlet-name>
    <servlet-class>org.apache.geronimo.console.servlet.ContextForwardServlet</servlet-class>
    <init-param>
       <param-name>servlet-path</param-name>
       <param-value>/dwr4</param-value>
    </init-param>
    <init-param>
       <param-name>context-path</param-name>
       <param-value>/plugin</param-value>
    </init-param>
  </servlet>

  <!-- DWR for the plan creator portlets -->
  <servlet>
    <display-name>DWR Forward Servlet 5</display-name>
    <servlet-name>dwr-forward5</servlet-name>
    <servlet-class>org.apache.geronimo.console.servlet.ContextForwardServlet</servlet-class>
    <init-param>
       <param-name>servlet-path</param-name>
       <param-value>/dwr5</param-value>
    </init-param>
    <init-param>
       <param-name>context-path</param-name>
       <param-value>/plan-creator</param-value>
    </init-param>
  </servlet>

  <!-- DWR for the EJBServer Portlet -->
  <servlet>
    <display-name>DWR Forward Servlet 6</display-name>
    <servlet-name>dwr-forward6</servlet-name>
    <servlet-class>org.apache.geronimo.console.servlet.ContextForwardServlet</servlet-class>
    <init-param>
       <param-name>servlet-path</param-name>
       <param-value>/dwr6</param-value>
    </init-param>
    <init-param>
       <param-name>context-path</param-name>
       <param-value>/openejb-server</param-value>
    </init-param>
  </servlet>

  <servlet>
    <display-name>Generic Context Forward Servlet</display-name>
    <servlet-name>context-forward</servlet-name>
    <servlet-class>org.apache.geronimo.console.servlet.GenericForwardServlet</servlet-class>
    <init-param>
      <param-name>charset</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <init-param>
      <param-name>form-encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <init-param>
      <param-name>container-encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>dwr-forward</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>dwr-forward2</servlet-name>
    <url-pattern>/dwr2/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>dwr-forward3</servlet-name>
    <url-pattern>/dwr3/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>dwr-forward4</servlet-name>
    <url-pattern>/dwr4/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>dwr-forward5</servlet-name>
    <url-pattern>/dwr5/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>dwr-forward6</servlet-name>
    <url-pattern>/dwr6/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>plutoPortalDriver</servlet-name>
    <url-pattern>/portal/*</url-pattern>
  </servlet-mapping>
    
  <servlet-mapping>
      <servlet-name>plutoPortalDriver</servlet-name>
      <url-pattern>/secure/*</url-pattern>
  </servlet-mapping>

  <!-- todo: is this necessary, or even safe? -->
  <servlet-mapping>
    <servlet-name>plutoPortalDriverLogout</servlet-name>
    <url-pattern>/Logout</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>context-forward</servlet-name>
    <url-pattern>/forwards/*</url-pattern>
  </servlet-mapping>

  <taglib>
    <taglib-uri>http://java.sun.com/portlet</taglib-uri>
    <taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
    <taglib-location>/WEB-INF/tld/portlet_2_0.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://portals.apache.org/pluto/portlet-el</taglib-uri>
    <taglib-location>/WEB-INF/tld/portlet-el.tld</taglib-location>
  </taglib>
  
  <taglib>
    <taglib-uri>http://portals.apache.org/pluto/portlet-el_2_0</taglib-uri>
    <taglib-location>/WEB-INF/tld/portlet-el_2_0.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>http://portals.apache.org/pluto</taglib-uri>
    <taglib-location>/WEB-INF/tld/pluto.tld</taglib-location>
  </taglib>
  
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>Login and HTTPS Required</web-resource-name>
      <url-pattern>/secure/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
      <role-name>monitor</role-name>
    </auth-constraint>
    <user-data-constraint>
      <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
  </security-constraint>


        <security-constraint>
    <web-resource-collection>
      <web-resource-name>console monitor</web-resource-name>
      <url-pattern>/portal</url-pattern>
      <url-pattern>/portal/0/Welcome</url-pattern>
      <url-pattern>/portal/0/Welcome/*</url-pattern>
      <url-pattern>/portal/1-1-1/Application Server/System Information/Server Information</url-pattern>
      <url-pattern>/portal/1-1-1/Application Server/System Information/Server Information/*</url-pattern>
      <url-pattern>/portal/1-1-2/Application Server/System Information/Java System Info</url-pattern>
      <url-pattern>/portal/1-1-2/Application Server/System Information/Java System Info/*</url-pattern>
      <url-pattern>/portal/1-1-4/Application Server/System Information/Thread Pools</url-pattern>
      <url-pattern>/portal/1-1-4/Application Server/System Information/Thread Pools/*</url-pattern>
      <url-pattern>/portal/5-1/Monitoring and Troubleshooting/Monitoring</url-pattern>
      <url-pattern>/portal/5-1/Monitoring and Troubleshooting/Monitoring/*</url-pattern>
      <url-pattern>/forwards/*</url-pattern>
      <url-pattern>/dwr/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>monitor</role-name>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>
  
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>console</web-resource-name>
      <url-pattern>/portal</url-pattern>
      <url-pattern>/portal/*</url-pattern>
      <url-pattern>/forwards/*</url-pattern>
      <url-pattern>/dwr/*</url-pattern>
      <url-pattern>/dwr2/*</url-pattern>
      <url-pattern>/dwr3/*</url-pattern>
      <url-pattern>/dwr4/*</url-pattern>
      <url-pattern>/dwr5/*</url-pattern>
      <url-pattern>/dwr6/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>
  <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>geronimo-admin</realm-name>
    <form-login-config>
      <form-login-page>/login.jsp</form-login-page>
      <form-error-page>/loginerror.jsp</form-error-page>
    </form-login-config>
  </login-config>

  <security-role>
    <role-name>admin</role-name>
  </security-role>
  
    <security-role>
    <role-name>monitor</role-name>
  </security-role>


<!--
Automatically created by Apache Tomcat JspC.
Place this fragment in the web.xml before all icon, display-name,
description, distributable, and context-param elements.
-->

    <servlet>
        <servlet-name>jsp.index_jsp</servlet-name>
        <servlet-class>jsp.index_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.loginerror_jsp</servlet-name>
        <servlet-class>jsp.loginerror_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.about_jsp</servlet-name>
        <servlet-class>jsp.about_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.logout_jsp</servlet-name>
        <servlet-class>jsp.logout_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.login_jsp</servlet-name>
        <servlet-class>jsp.login_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.login_005fsuccess_jsp</servlet-name>
        <servlet-class>jsp.login_005fsuccess_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.test_005fsession_jsp</servlet-name>
        <servlet-class>jsp.test_005fsession_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.themes.portlets_002dwith_002dtree_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.themes.portlets_002dwith_002dtree_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.themes.default_002dtheme_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.themes.default_002dtheme_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.themes.banner_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.themes.banner_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.themes.portlets_002donly_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.themes.portlets_002donly_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.themes.portlet_002dskin_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.themes.portlet_002dskin_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.themes.navigation_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.themes.navigation_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.about.view_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.about.view_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.about.edit_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.about.edit_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.about.help_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.about.help_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.view_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.admin.view_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.edit_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.admin.edit_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.help_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.admin.help_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.page.view_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.admin.page.view_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.page.TomcatDeploymentHelp_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.admin.page.TomcatDeploymentHelp_jsp</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.page.help_jsp</servlet-name>
        <servlet-class>jsp.WEB_002dINF.fragments.admin.page.help_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>jsp.index_jsp</servlet-name>
        <url-pattern>/index.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.loginerror_jsp</servlet-name>
        <url-pattern>/loginerror.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.about_jsp</servlet-name>
        <url-pattern>/about.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.logout_jsp</servlet-name>
        <url-pattern>/logout.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.login_jsp</servlet-name>
        <url-pattern>/login.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.login_005fsuccess_jsp</servlet-name>
        <url-pattern>/login_success.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.test_005fsession_jsp</servlet-name>
        <url-pattern>/test_session.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.themes.portlets_002dwith_002dtree_jsp</servlet-name>
        <url-pattern>/WEB-INF/themes/portlets-with-tree.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.themes.default_002dtheme_jsp</servlet-name>
        <url-pattern>/WEB-INF/themes/default-theme.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.themes.banner_jsp</servlet-name>
        <url-pattern>/WEB-INF/themes/banner.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.themes.portlets_002donly_jsp</servlet-name>
        <url-pattern>/WEB-INF/themes/portlets-only.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.themes.portlet_002dskin_jsp</servlet-name>
        <url-pattern>/WEB-INF/themes/portlet-skin.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.themes.navigation_jsp</servlet-name>
        <url-pattern>/WEB-INF/themes/navigation.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.about.view_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/about/view.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.about.edit_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/about/edit.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.about.help_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/about/help.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.view_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/admin/view.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.edit_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/admin/edit.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.help_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/admin/help.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.page.view_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/admin/page/view.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.page.TomcatDeploymentHelp_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/admin/page/TomcatDeploymentHelp.jsp</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp.WEB_002dINF.fragments.admin.page.help_jsp</servlet-name>
        <url-pattern>/WEB-INF/fragments/admin/page/help.jsp</url-pattern>
    </servlet-mapping>

<!--
All session-config, mime-mapping, welcome-file-list, error-page, taglib,
resource-ref, security-constraint, login-config, security-role,
env-entry, and ejb-ref elements should follow this fragment.
-->


</web-app>