Hi Piwai

I struggled with the same problem, and found another solution by inserting 
the following lines into web.xml

<!-- avoid instantiate javax.naming.InitialContext in 
AbstractConfigurationFilter [line: 53] - 
getPropertyFromInitParams(FilterConfig, String, String) -->
<context-param>
<param-name>artifactParameterName</param-name>
<param-value>ticket</param-value>
</context-param>

By doing  so, you don't have to modify shiro source code. My cas client 
version is 3.2.1. There should be not much difference regarding this 
problem.

I hope you're still around.

Regards,
Frank

On Tuesday, April 27, 2010 7:23:13 PM UTC+8, Piwaï wrote:
>
> Hi ! 
>
> Just wanted to let you know, I was able to use CAS client (http:// 
> www.jasig.org/cas) with AppEngine. So I'll write the few steps here, 
> in case anyone look for it when searching on Google ;-) 
>
> First, I followed these steps : 
>
>
> http://www.ja-sig.org/wiki/display/CASC/Configuring+the+JA-SIG+CAS+Client+for+Java+in+the+web.xml
>  
>
> I downloaded cas-client-3.1.10 here : 
> http://www.ja-sig.org/downloads/cas-clients/cas-client-3.1.10-release.zip 
>
> I only used cas-client-core. However, I had to make some changes to 
> one of the classes : 
> org.jasig.cas.client.util.AbstractConfigurationFilter . This is 
> because the filter tries to instanciate an InitialContext() to find 
> parameters in the context. Appengine does not seem yet to allow 
> instanciation of InitialContext. 
>
> So I changed the following file : 
>
> cas-client-3.1.10-release\cas-client-3.1.10\cas-client-core\src\main 
> \java\org\jasig\cas\client\util\AbstractConfigurationFilter.java 
>
> and removed some code in the middle : 
>
> ******************************* 
>     protected final String getPropertyFromInitParams(final 
> FilterConfig filterConfig, final String propertyName, final String 
> defaultValue)  { 
>         final String value = 
> filterConfig.getInitParameter(propertyName); 
>
>         if (CommonUtils.isNotBlank(value)) { 
>             log.info("Property [" + propertyName + "] loaded from 
> FilterConfig.getInitParameter with value [" + value + "]"); 
>             return value; 
>         } 
>
>         final String value2 = 
> filterConfig.getServletContext().getInitParameter(propertyName); 
>
>         if (CommonUtils.isNotBlank(value2)) { 
>             log.info("Property [" + propertyName + "] loaded from 
> ServletContext.getInitParameter with value [" + value2 + "]"); 
>             return value2; 
>         } 
> // ****** CODE REMOVED HERE 
>
>         log.info("Property [" + propertyName + "] not found.  Using 
> default value [" + defaultValue + "]"); 
>         return defaultValue; 
>     } 
> ******************************* 
>
> I then repackaged cas-client : 
> cd cas-client-3.1.10/cas-client-core 
> mvn package -Dmaven.test.skip 
>
> I added cas-client-3.1.10/cas-client-core-patched/target/cas-client- 
> core-3.1.10.jar to my GAE project. 
>
> Then it's just a matter a configuring your web.xml to work with CAS, 
> as with any other CASsified app. 
>
> If you have any questions, please let me know. 
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group. 
> To post to this group, send email to 
> [email protected]<javascript:>. 
>
> To unsubscribe from this group, send email to 
> [email protected] <javascript:>. 
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to