You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Nagaraju Kurma <na...@enhancesys.com> on 2013/06/14 09:32:14 UTC

ISSUE

shiroFilter configured in spring application context is not using
successUrl, unauthorizedurl properties where loginUrl property is
successfully working.

i tested your sample application [ \shiro-root-1.2.1\samples\spring ] even,
but in your application also not working.


your actual configuration of shiroFilter


<bean id="shiroFilter"
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
        <property name="securityManager" ref="securityManager"/>
        <property name="loginUrl" value="/s/login"/>
        <property name="successUrl" value="/s/index"/>
        <property name="unauthorizedUrl" value="/s/unauthorized"/>
............
</bean>

but here only the loginUrl property is getting utilized, but not successUrl
and unauthorizedurl

i came to know where i tested like this

<bean id="shiroFilter"
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
        <property name="securityManager" ref="securityManager"/>
        <property name="loginUrl" value="/s/login"/>
        <property name="successUrl" value="/s/index/abc"/>
                                    <!--- changed---->
        <property name="unauthorizedUrl" value="/s/unauthorized/def"/>
                                <!--- changed---->
 .............
</bean>


still is not giving any error saying that /s/index/abc, /s/unauthorized/def
not available...

here we are doing these two things explicitely with filters which is more
developer burdain and unnecessary..............

in my application this is my configuration


<bean id="shiroFilter"
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<property name="loginUrl" value="/user/performs/login" />
<property name="successUrl"
value="redirect:/main/welcome1?cat=customermanagement.searchcustomer" />
<property name="unauthorizedUrl" value="/user/performs/login" />
<property name="filters">
                 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        </bean>

here also not working pls help me out...

any help is appreciated,
thnaking u :)



-- 

Regards,****

Nagaraju.