Url rewrite issue not getting current session (getPrincipal()) for redirected url
I have rewrited url
f开发者_开发知识库rom: http://www.xyz.com/Sample/showSamples-ASA21DS
to: http://www.xyz.com/Sample/showSamples.do?sampleId=ASA21DS
using urlRewrite.xml
<urlrewrite>
<rule>
<from>^/http://www.xyz.com/Sample/showSamples-ASA21DS</from>
<to>http://www.xyz.com/Sample/showSamples.do?sampleId=ASA21DS</to>
</rule>
</urlrewrite>
But, I dont get current session for this new url.. For this,
SecurityContextHolder.getContext().getAuthentication().getPrincipal()
i m getting null
Check to make sure the new request is still going through the Spring Security filters. This question is actually on the official FAQ page: http://static.springsource.org/spring-security/site/faq/faq.html#faq-no-filters-no-context
精彩评论