<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 $Id: web.xml 4911 2006-07-08 20:23:30Z novotny $
-->
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

    <display-name>GridSphere Portlet Container</display-name>

    <description>
        GridSphere Portlet Container
    </description>

    <!-- this is needed for clustering of multiple Tomcats -->
    <distributable/>

    <context-param>
        <!-- preferred repository selector. "preferred" because
        if one is already installed, this choice is ignored. -->
        <param-name>log4j-selector</param-name>
        <param-value>org.apache.log4j.selector.ContextJNDISelector</param-value>
    </context-param>

    <context-param>
        <!-- relative path to config file within current webapp -->
        <param-name>log4j-config</param-name>
        <param-value>WEB-INF/classes/log4j.properties</param-value>
    </context-param>

    <filter>
        <filter-name>GridSphere Filter</filter-name>
        <filter-class>org.gridlab.gridsphere.filters.GridSphereFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>GridSphere Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.gridlab.gridsphere.servlets.GridSphereServlet</listener-class>
    </listener>

    <listener>
        <listener-class>org.apache.log4j.servlet.InitContextListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>gridsphere</servlet-name>
        <servlet-class>org.gridlab.gridsphere.servlets.GridSphereServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>LoginPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.login.LoginPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>LogoutPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.login.LogoutPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>SetupPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.setup.GridSphereSetupPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>UserManagerPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.users.UserManagerPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>GroupManagerPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.groups.GroupManagerPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>RoleManagerPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.roles.RoleManagerPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>LayoutManagerPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.layout.LayoutManagerPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>PortletApplicationManager</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.portlets.PortletApplicationManager</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>ProfileManagerPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.user.ProfileManagerPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>SessionManagerPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.portlets.SessionManagerPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>TrackerStatisticsPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.admin.tracker.TrackerStatisticsPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>LocalePortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.locale.LocalePortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>LayoutPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.layout.UserLayoutPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>MessagingServicesPortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.messaging.MessagingServicesPortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>ServletRedirector</servlet-name>
        <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>ServletTestRunner</servlet-name>
        <servlet-class>org.apache.cactus.server.runner.ServletTestRunner</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>DatePortlet</servlet-name>
        <servlet-class>org.gridlab.gridsphere.portlets.core.date.DatePortlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>SecureDirectory</servlet-name>
        <servlet-class>org.gridlab.gridsphere.servlets.SecureDirectory</servlet-class>
        <init-param>
            <param-name>strongProtection</param-name>
            <param-value>true</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>gridsphere</servlet-name>
        <url-pattern>/@GRIDSPHERE_CONTEXT@/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>LoginPortlet</servlet-name>
        <url-pattern>/login</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>LogoutPortlet</servlet-name>
        <url-pattern>/logout</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>LayoutPortlet</servlet-name>
        <url-pattern>/layout</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>SetupPortlet</servlet-name>
        <url-pattern>/admin/setup</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
        <servlet-name>UserManagerPortlet</servlet-name>
        <url-pattern>/admin/users</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>GroupManagerPortlet</servlet-name>
        <url-pattern>/admin/groups</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>RoleManagerPortlet</servlet-name>
        <url-pattern>/admin/roles</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>SessionManagerPortlet</servlet-name>
        <url-pattern>/admin/session</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>LayoutManagerPortlet</servlet-name>
        <url-pattern>/admin/layout</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>PortletApplicationManager</servlet-name>
        <url-pattern>/admin/portlets</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>TrackerStatisticsPortlet</servlet-name>
        <url-pattern>/admin/tracker</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ProfileManagerPortlet</servlet-name>
        <url-pattern>/users/profile</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ServletRedirector</servlet-name>
        <url-pattern>/ServletRedirector</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ServletTestRunner</servlet-name>
        <url-pattern>/ServletTestRunner</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>LocalePortlet</servlet-name>
        <url-pattern>/locale</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>MessagingServicesPortlet</servlet-name>
        <url-pattern>/admin/messagingservice</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>SecureDirectory</servlet-name>
        <url-pattern>/secure/*</url-pattern>
    </servlet-mapping>

    <mime-mapping>
        <extension>wbmp</extension>
        <mime-type>image/vnd.wap.wbmp</mime-type>
    </mime-mapping>

    <mime-mapping>
        <extension>wml</extension>
        <mime-type>text/vnd.wap.wml</mime-type>
    </mime-mapping>

    <mime-mapping>
        <extension>wmls</extension>
        <mime-type>text/vnd.wap.wmlscript</mime-type>
    </mime-mapping>

    <!-- the 404 page -->
    <error-page>
        <error-code>404</error-code>
        <location>/jsp/errors/notfound.jsp</location>
    </error-page>

    <!-- the 404 page -->
    <error-page>
        <error-code>401</error-code>
        <location>/jsp/errors/unauthorized.jsp</location>
    </error-page>

    <!-- for internal errors -->
    <error-page>
        <exception-type>java.lang.Throwable</exception-type>
        <location>/jsp/error.jsp</location>
    </error-page>

    <env-entry>
        <description>JNDI logging context for this app</description>
        <env-entry-name>log4j/logging-context</env-entry-name>
        <env-entry-value>gridsphere</env-entry-value>
        <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    
</web-app>
