web.xml file whats wrong with it ?

1 message Options
Embed this post
Permalink
Abdellatif HAROUS

web.xml file whats wrong with it ?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
hi all......


this is the link that I was following .......I did the same thing , but could not get the examples run , which are founf in the apache HelloWorld

here is the web.xml file , can some one see why I am not getting the login page


<?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 th 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/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <display-name>Servlet 2.4 Examples</display-name>
    <description>
      Servlet 2.4 Examples.
    </description>
   
    <context-param>
            <param-name>serverName</param-name>
            <param-value>http://localhost:8080</param-value>
    </context-param>

   
    
     <!-- second part which I added -->
    
     <!-- The AuthenticationFilter is what detects whether a user needs to be authenticated or not.
          If a user needs to be authenticated, it will redirect the user to the CAS server. -->
    
     <filter>
       <filter-name>CAS Authentication Filter</filter-name>
       <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
       <init-param>
                <param-name>casServerLoginUrl</param-name>
                <param-value>http://localhost:8080/cas/login</param-value>
       </init-param>
       <init-param>
                <param-name>service</param-name>
                <param-value>http://localhost:8080/servlets-examples/helloworld.html</param-value>
       </init-param>
       <init-param>
                <param-name>serverName</param-name>
                <param-value>http://localhost:8080</param-value>
       </init-param>
     </filter>
    

    
     <!--  Validates tickets using the CAS 1.0 Protocol -->
    
     <filter>
       <filter-name>CAS Validation Filter</filter-name>
       <filter-class>org.jasig.cas.client.validation.Cas10TicketValidationFilter</filter-class>
       <init-param>
                 <param-name>casServerLoginUrl</param-name>
                 <param-value>http://localhost:8080/cas/login</param-value>
       </init-param>
       <init-param>
                 <param-name>serverName</param-name>
                 <param-value>http://localhost:8080</param-value>
       </init-param>
     </filter>
    
    
    
    
     <!-- Wraps an HttpServletRequest so that the getRemoteUser and getPrincipal return the CA related entries -->
    
     <filter>
       <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
       <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
     </filter>

     <filter>
      <filter-name>CAS Assertion Thread Local Filter</filter-name>
      <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
    </filter>
    
     <!-- Places the Assertion in a ThreadLocal for portions of the application that need access to it. -->
    
   
   
   
    <filter-mapping>
            <filter-name>CAS Authentication Filter</filter-name>
            <url-pattern>/*</url-pattern>
    </filter-mapping>
       
    <filter-mapping>
            <filter-name>CAS Validation Filter</filter-name>
            <url-pattern>/*</url-pattern>
    </filter-mapping>
       
    <filter-mapping>
            <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
            <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
                <filter-name>CAS Assertion Thread Local Filter</filter-name>
            <url-pattern>/*</url-pattern>
    </filter-mapping>

   
   

   

    
    
     <!-- end of part added -->
    

   

    <!-- Define servlet-mapped and path-mapped example filters -->
    <filter>
        <filter-name>Servlet Mappe Filter</filter-name>
        <filter-class>filters.ExampleFilter</filter-class>
    <init-param>
        <param-name>attribute</param-name>
        <param-value>filters.ExampleFilter.SERVLET_MAPPED</param-value>
    </init-param>
    </filter>
    <filter>
        <filter-name>Path Mapped Filter</filter-name>
        <filter-class>filters.ExampleFilter</filter-class>
    <init-param>
        <param-name>attribute</param-name>
        <param-value>filters.ExampleFilter.PATH_MAPPED</param-value>
    </init-param>
    </filter>
    <filter>
        <filter-name>Request Dumper Filter</filter-name>
        <filter-class>filters.RequestDumperFilter</filter-class>
    </filter>

    <!-- Example filter to set character encoding on each request -->
    <filter>
        <filter-name>Set Character Encoding</filter-name>
        <filter-class>filters.SetCharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>EUC_JP</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>Compression Filter</filter-name>
        <filter-class>compressionFilters.CompressionFilter</filter-class>

        <init-param>
          <param-name>compressionThreshold</param-name>
          <param-value>10</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
    </filter>

    <!-- Define filter mappings for the defined filters -->
    <filter-mapping>
        <filter-name>Servlet Mapped Filter</filter-name>
    <servlet-name>invoker</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>Path Mapped Filter</filter-name>
    <url-pattern>/servlet/*</url-pattern>
    </filter-mapping>


<!-- Example filter mapping to apply the "Set Character Encoding" filter
     to *all* requests processed by this web application -->
<!--
    <filter-mapping>
        <filter-name>Set Character Encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
      <filter-name>Compression Filter</filter-name>
      <url-pattern>/CompressionTest</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
        <filter-name>Request Dumper Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

    <!-- Define example application events listeners -->
    <listener>
        <listener-class>listeners.ContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>listeners.SessionListener</listener-class>
    </listener>

    <!-- Define servlets that are included in the example application -->

    <servlet>
        <servlet-name>CompressionFilterTestServlet</servlet-name>
        <servlet-class>compressionFilters.CompressionFilterTestServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>HelloWorldExample</servlet-name>
        <servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>RequestInfoExample</servlet-name>
        <servlet-class>RequestInfoExample</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>RequestHeaderExample</servlet-name>
        <servlet-class>RequestHeaderExample</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>RequestParamExample</servlet-name>
        <servlet-class>RequestParamExample</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>CookieExample</servlet-name>
        <servlet-class>CookieExample</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>SessionExample</servlet-name>
        <servlet-class>SessionExample</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>CompressionFilterTestServlet</servlet-name>
        <url-pattern>/CompressionTest</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>HelloWorldExample</servlet-name>
        <url-pattern>/servlet/HelloWorldExample</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>RequestInfoExample</servlet-name>
        <url-pattern>/servlet/RequestInfoExample/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>RequestHeaderExample</servlet-name>
        <url-pattern>/servlet/RequestHeaderExample</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>RequestParamExample</servlet-name>
        <url-pattern>/servlet/RequestParamExample</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>CookieExample</servlet-name>
        <url-pattern>/servlet/CookieExample</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SessionExample</servlet-name>
        <url-pattern>/servlet/SessionExample</url-pattern>
    </servlet-mapping>

    <security-constraint>
      <display-name>Example Securit Constraint</display-name>
      <web-resource-collection>
         <web-resource-name>Protected Area</web-resource-name>
     <!-- Define the context-relative URL(s) to be protected -->
         <url-pattern>/jsp/security/protected/*</url-pattern>
     <!-- If you list http methods, only those methods are protected -->
     <http-method>DELETE</http-method>
         <http-method>GET</http-method>
         <http-method>POST</http-method>
     <http-method>PUT</http-method>
      </web-resource-collection>
      <auth-constraint>
         <!-- Anyone with one of the listed roles may access this area -->
         <role-name>tomcat</role-name>
     <role-name>role1</role-name>
      </auth-constraint>
    </security-constraint>

    <!-- Default login configuration uses form-based authentication -->
    <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>Example Form-Based Authentication Area</realm-name>
      <form-login-config>
        <form-login-page>/jsp/security/protected/login.jsp</form-login-page>
        <form-error-page>/jsp/security/protected/error.jsp</form-error-page>
      </form-login-config>
    </login-config>

    <!-- Security roles referenced by this web application -->
    <security-role>
      <role-name>role1</role-name>
    </security-role>
    <security-role>
      <role-name>tomcat</role-name>
    </security-role>

    <!-- Environment entry examples -->
    <!--env-entry>
      <env-entry-description>
         The maximum number of tax exemptions allowed to be set.
      </env-entry-description>
      <env-entry-name>maxExemptions</env-entry-name>
      <env-entry-value>15</env-entry-value>
      <env-entry-type>java.lang.Integer</env-entry-type>
    </env-entry-->
    <env-entry>
      <env-entry-name>minExemptions</env-entry-name>
      <env-entry-type>java.lang.Integer</env-entry-type>
      <env-entry-value>1</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/name1</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>value1</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/bar/name2</env-entry-name>
      <env-entry-type>java.lang.Boolean</env-entry-type>
      <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>name3</env-entry-name>
      <env-entry-type>java.lang.Integer</env-entry-type>
      <env-entry-value>1</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/name4</env-entry-name>
      <env-entry-type>java.lang.Integer</env-entry-type>
      <env-entry-value>10</env-entry-value>
    </env-entry>

</web-app>



check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. More than messages
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user