Just in cas, there is a mistake in your attribute name.
It should be :
edu.yale.its.tp.cas.client.filter.user instead of
edu.yale.its.tp.cas.cient.filter.user
Arnaud Lesueur
Le Mer 6 septembre 2006 14:24, Paulo Cheque a écrit :
> Thanks.
> Ajax4Jsf's filter need to be before another filters... but I don't use it.
> I have to use ExtensionFilter of MyFaces.
>
>
> I've tried a lot of combinations and I don't get success =(
> I created a filter only to print the informations but always returns null.
>
>
> HttpServletRequest request = (HttpServletRequest) req;
> HttpServletResponse response = (HttpServletResponse) resp;
> System.out.println(request.getRemoteUser());
> System.out.println(request.getSession().getAttribute("edu.yale.its.tp.cas.cient.filter.user"));
>
>
> Maybe if I implement another filter, or extends CASFilter, what do you
> think about?
>
> Thanks in advance
> Paulo
>
>
> On 9/6/06, Ingeneur <[EMAIL PROTECTED]> wrote:
>
>> I remember having a similar problem with some ajax library (not with
>> CAS, though) where the request object was being cleaned up and some
>> attributes/parameters removed. We got over by re-arranging the order of the
>> filters. Honestly, I don't know if that
>> made sense, but worked.
>>
>> On 9/6/06, Paulo Cheque <[EMAIL PROTECTED]> wrote:
>>
>>> I've tried both solutions and both returns null =(
>>>
>>>
>>> FacesContext facesContext = FacesContext.getCurrentInstance();
>>> System.out.println(((HttpServletRequest)facesContext.getExternalContext().getRequest()).getRemoteUser());
>>> System.out.println(facesContext.getExternalContext().getRemoteUser());
>>>
>>>
>>> Thank you by your help!
>>> Anyone has another advice?
>>>
>>>
>>> Thanks in advance
>>> Paulo
>>>
>>>
>>> On 9/6/06, Ingeneur <[EMAIL PROTECTED]> wrote:
>>>
>>>> Hi Paulo,
>>>>
>>>>
>>>> Can you try,
>>>> FacesContext facesContext = FacesContext.getCurrentInstance();
>>>> user =
>>>> (HttpServletRequest)(facesContext.getExternalContext().getRequest()).getRemoteUser();
>>>>
>>>> Am not sure if,
>>>>
>>>>
>>>> FacesContext facesContext = FacesContext.getCurrentInstance();
>>>> user = facesContext.getExternalContext().getRemoteUser();
>>>>
>>>> does the same.
>>>>
>>>> Abishek Goda
>>>>
>>>>
>>>> On 9/6/06, Paulo Cheque <[EMAIL PROTECTED]> wrote:
>>>>
>>>>> Hi, I am using CAS with JSF (MyFaces) but I am having problems getting
>>>>> the username that has logged in.
>>>>>
>>>>> MyCode:
>>>>>
>>>>>
>>>>> FacesContext facesContext = FacesContext.getCurrentInstance();
>>>>> HttpSession session = (HttpSession)
>>>>> facesContext.getExternalContext().getSession(false);
>>>>> session.getAttribute("edu.yale.its.tp.cas.cient.filter.user");
>>>>>
>>>>> Last command always returns null.
>>>>>
>>>>>
>>>>> Anyone know what I am doing wrong or any link where I can get help?
>>>>>
>>>>>
>>>>> Thanks in advance
>>>>> Paulo
>>>>> _______________________________________________
>>>>> Yale CAS mailing list
>>>>> [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>>
>>>> Abishek Goda
>>>> http://www.geocities.com/abi_gt
>>>> _______________________________________________
>>>> Yale CAS mailing list
>>>> [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
>>>>
>>>>
>>> _______________________________________________
>>> Yale CAS mailing list
>>> [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>>
>> Abishek Goda
>> http://www.geocities.com/abi_gt
>> _______________________________________________
>> Yale CAS mailing list
>> [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
>>
>>
> _______________________________________________
> Yale CAS mailing list
> [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas