Another question - the URLs controlled by the VelocityViewServlet are
outside the control of the CAS filters.
Would there possibly be a problem passing context between filtered and
unfiltered servlets?
Garey Mills
On 5/5/2011 9:38 AM, Garey Mills wrote:
> Scott -
>
> I think I am logging everything. I have a file called
> logging.properties in my WEB-INF/classes directory that contains this:
>
> org.apache.catalina.core.ContainerBase.[Catalina].level = ALL
> org.apache.catalina.core.ContainerBase.[Catalina].handlers =
> java.util.logging.ConsoleHandler
>
>
> I can see that the ServletContext is not making it to the
> VelocityViewServlet, which is called via a redirect, as in
>
> ServletContext sc;
> RequestDispatcher dispatcher =
> sc.getRequestDispatcher("/templates/dashboard.vm");
> dispatcher.forward(req,resp);
>
> inside of the servlets that are subject to the CAS filters.
>
> The problem seems to be with the AuthenticationFilter. When I
> comment it out, even when I leave the other
> filters in, the redirect occurs (though perhaps this just means that
> the other filters don't do anything because their action is dependent
> on the Authentication Filter).
> When I put it in, it does not appear that the redirect is working at
> all, since I am not getting any debug info from the VelocityViewServlet.
>
> Could you make any suggestions for solving this. I would dearly
> love to get Guice, CAS and Velocity all working together.
>
> Garey Mills
>
> On 5/4/2011 6:45 AM, Scott Battaglia wrote:
>> What logging level do you have set for Tomcat? If you increase the
>> logging you might be able to see the cause.
>>
>>
>> On Tue, May 3, 2011 at 5:52 PM, Garey Mills
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> This is on RedHat Linux 5. I have these libraries in my WEB-INF/lib
>>
>> cas-client-core-3.2.0.jar
>> cas-client-integration-tomcat-v7-3.2.0.jar
>> commons-logging-1.1.jar
>> serializer.jar
>> xercesImpl.jar
>> xml-apis.jar
>> xmlsec-1.3.0.jar
>>
>> Here is how CAS is configured. (This filter configuration is done
>> in a Guice module, not web.xml, but the effect
>> should be the same:
>>
>>
>> bind(org.jasig.cas.client.authentication.AuthenticationFilter.class).in(Singleton.class);
>> Map<String, String> auth_params = new HashMap<String, String>();
>> auth_params.put("casServerLoginUrl",
>> "https://auth-test.berkeley.edu/cas/login");
>> auth_params.put("serverName", "linuxdev.lib.berkeley.edu:7654
>> <http://linuxdev.lib.berkeley.edu:7654>");
>>
>>
>>
>> filter("/in/*").through(org.jasig.cas.client.authentication.AuthenticationFilter.class,
>> auth_params);
>>
>>
>>
>>
>> bind(org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.class).in(Singleton.class);
>> Map<String, String> valid_params = new HashMap<String, String>();
>> valid_params.put("casServerUrlPrefix",
>> "https://auth-test.berkeley.edu/cas");
>> valid_params.put("serverName", "linuxdev.lib.berkeley.edu:7654
>> <http://linuxdev.lib.berkeley.edu:7654>");
>>
>>
>>
>> filter("/in/*").through(org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter.class,
>> valid_params);
>>
>>
>>
>> bind(org.jasig.cas.client.util.HttpServletRequestWrapperFilter.class).in(Singleton.class);
>>
>>
>>
>> filter("/in/*").through(org.jasig.cas.client.util.HttpServletRequestWrapperFilter.class);
>>
>>
>>
>>
>> bind(org.jasig.cas.client.util.AssertionThreadLocalFilter.class).in(Singleton.class);
>>
>>
>> filter("/in/*").through(org.jasig.cas.client.util.AssertionThreadLocalFilter.class);
>>
>> The application won't start. When I look at the logs I see:
>>
>> May 3, 2011 10:06:02 AM
>> org.apache.catalina.loader.WebappClassLoader validateJarFile
>> INFO:
>>
>> validateJarFile(/data/gis/java_sub_app/web/WEB-INF/lib/servletapi-2.3.jar)
>> - jar not loaded. See Servlet Spec
>> 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
>> May 3, 2011 10:06:02 AM org.apache.catalina.startup.TaglibUriRule
>> body
>> INFO: TLD skipped. URI: http://velocity.apache.org/velocity-view
>> is already defined
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [serverName] loaded from
>> FilterConfig.getInitParameter with value
>> [linuxdev.lib.berkeley.edu:7654
>> <http://linuxdev.lib.berkeley.edu:7654>]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [service] not found. Using default value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [artifactParameterName] not found. Using default
>> value [ticket]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [serviceParameterName] not found. Using default
>> value [service]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [encodeServiceUrl] not found. Using default value
>> [true]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [casServerLoginUrl] loaded from
>> FilterConfig.getInitParameter with value [https://auth-test.berkeley
>> .edu/cas/login]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [renew] not found. Using default value [false]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [gateway] not found. Using default value [false]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [gatewayStorageClass] not found. Using default
>> value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [serverName] loaded from
>> FilterConfig.getInitParameter with value
>> [linuxdev.lib.berkeley.edu:7654
>> <http://linuxdev.lib.berkeley.edu:7654>]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [service] not found. Using default value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [artifactParameterName] not found. Using default
>> value [ticket]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [serviceParameterName] not found. Using default
>> value [service]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [encodeServiceUrl] not found. Using default value
>> [true]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [proxyReceptorUrl] not found. Using default value
>> [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [proxyGrantingTicketStorageClass] not found.
>> Using default value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [millisBetweenCleanUps] not found. Using default
>> value [60000]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [exceptionOnValidationFailure] not found. Using
>> default value [true]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [redirectAfterValidation] not found. Using
>> default value [true]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [useSession] not found. Using default value [true]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [acceptAnyProxy] not found. Using default value
>> [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [allowedProxyChains] not found. Using default
>> value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [casServerUrlPrefix] loaded from
>> FilterConfig.getInitParameter with value
>> [https://auth-test.berkeley.edu/cas]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [proxyCallbackUrl] not found. Using default value
>> [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [encoding] not found. Using default value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [renew] not found. Using default value [false]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [encoding] not found. Using default value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [hostnameVerifier] not found. Using default value
>> [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [hostnameVerifierConfig] not found. Using default
>> value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [roleAttribute] not found. Using default value [null]
>> May 3, 2011 10:06:02 AM
>> org.jasig.cas.client.util.AbstractConfigurationFilter
>> getPropertyFromInitParams
>> INFO: Property [ignoreCase] not found. Using default value [false]
>> May 3, 2011 10:06:02 AM org.apache.catalina.core.StandardContext
>> startInternal
>> SEVERE: Error filterStart
>>
>>
>> I have no idea why the filterStart is failing. Does anyone have
>> any ideas?
>>
>> Garey Mills
>> Library Systems Office
>> UC Berkeley
>>
>>
>>
>> --
>> You are currently subscribed to [email protected]
>> <mailto:[email protected]> as: [email protected]
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see
>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>
>>
>> --
>> You are currently subscribed [email protected]
>> as:[email protected]
>> To unsubscribe, change settings or access archives,
>> seehttp://www.ja-sig.org/wiki/display/JSG/cas-user
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user