You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by JerryK <je...@oceanustech.net> on 2008/06/29 18:04:05 UTC

Re: Spring Security and Struts2 Using tiles

I was able to get this working with Acegi, by setting the Dispatcher property
in web.xml
    <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        <dispatcher>FORWARD</dispatcher>
	</filter-mapping>

But, now when i try this with Spring Security 2.0.1, i am facing the same
problem as you have described here. Have you found any solution so far?



Alberto A. Flores wrote:
> 
> Folks,
> 
> My understanding is that Spring Security does not secure resources on 
> *forwards* (I believe tiles2 do forward/chaining). In an application 
> using Struts2, Spring and Tiles2, these forwards work just fine. Has 
> anyone had success using these three frameworks together using Spring 
> Security? I tried it today and It turned out that the security tag 
> (http://www.springframework/security/tags/):
> 
>    <security:authorization property="principal.username"/>
> 
> never fetches anything. Furthermore, the code:
> 
>    SecurityContextHolder.getContext().getAuthentication()
> 
> returns null (in the forwarded jsp page). Has anyone know what to do in 
> this case? I'm beginning to think I can not use Spring Security at all.
> 
> Regards,
> 
> -- 
> 
> Alberto A. Flores
> http://www.linkedin.com/in/aflores
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

-- 
View this message in context: http://www.nabble.com/Spring-Security-and-Struts2-Using-tiles-tp17215700p18182388.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Spring Security and Struts2 Using tiles

Posted by "Alberto A. Flores" <aa...@gmail.com>.
I had to put those efforts on the side as it was in a prototype and 
proof of concept phase. However, I have just began (today) to officially 
make serious effort into making it work (if at all possible) for our 
project. I should have a better answer by the end of the day... but any 
feedback would be much appreciated...


JerryK wrote:
> I was able to get this working with Acegi, by setting the Dispatcher property
> in web.xml
>     <url-pattern>/*</url-pattern>
>         <dispatcher>REQUEST</dispatcher>
>         <dispatcher>INCLUDE</dispatcher>
>         <dispatcher>FORWARD</dispatcher>
> 	</filter-mapping>
> 
> But, now when i try this with Spring Security 2.0.1, i am facing the same
> problem as you have described here. Have you found any solution so far?
> 
> 
> 
> Alberto A. Flores wrote:
>> Folks,
>>
>> My understanding is that Spring Security does not secure resources on 
>> *forwards* (I believe tiles2 do forward/chaining). In an application 
>> using Struts2, Spring and Tiles2, these forwards work just fine. Has 
>> anyone had success using these three frameworks together using Spring 
>> Security? I tried it today and It turned out that the security tag 
>> (http://www.springframework/security/tags/):
>>
>>    <security:authorization property="principal.username"/>
>>
>> never fetches anything. Furthermore, the code:
>>
>>    SecurityContextHolder.getContext().getAuthentication()
>>
>> returns null (in the forwarded jsp page). Has anyone know what to do in 
>> this case? I'm beginning to think I can not use Spring Security at all.
>>
>> Regards,
>>
>> -- 
>>
>> Alberto A. Flores
>> http://www.linkedin.com/in/aflores
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
> 

-- 

Alberto A. Flores
http://www.linkedin.com/in/aflores