में पाया जा सकता है मुझे उपयोगकर्ता को प्रमाणित होने पर केवल एक जेएसपी पृष्ठ में लॉगआउट लिंक प्रदर्शित करने में समस्या हो रही है।वसंत सुरक्षा - कोई दृश्यमान WebSecurityExpressionHandler उदाहरण अनुप्रयोग संदर्भ
<sec:authorize access="isAuthenticated()">
अपवाद::
Stacktrace:
....
root cause
javax.servlet.jsp.JspException: No visible WebSecurityExpressionHandler instance could be found in the application context. There must be at least one in order to support expressions in JSP 'authorize' tags.
org.springframework.security.taglibs.authz.AuthorizeTag.getExpressionHandler(AuthorizeTag.java:100)
org.springframework.security.taglibs.authz.AuthorizeTag.authorizeUsingAccessExpression(AuthorizeTag.java:58)
यहाँ मेरी है आवेदन-संदर्भ Security.xml:
<http auto-config='true' >
<intercept-url pattern="/user/**" access="ROLE_User" />
<logout logout-success-url="/hello.htm" />
</http>
<beans:bean id="daoAuthenticationProvider"
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
<beans:property name="userDetailsService" ref="userDetailsService" />
</beans:bean>
<beans:bean id="authenticationManager"
class="org.springframework.security.authentication.ProviderManager">
<beans:property name="providers">
<beans:list>
<beans:ref local="daoAuthenticationProvider" />
</beans:list>
</beans:property>
</beans:bean>
<authentication-manager>
<authentication-provider user-service-ref="userDetailsService">
<password-encoder hash="plaintext" />
</authentication-provider>
</authentication-manager>
मैं समझता हूँ कि यहाँ अपवाद मैं JSP पेज की इस पंक्ति में है कि मैं http टैग में उपयोग-अभिव्यक्ति = "सत्य" का उपयोग कर सकता हूं लेकिन इसका मतलब है कि मुझे इंटरसेप्ट-यूआरएल टैग और जावा कोड में अभिव्यक्ति का उपयोग करना होगा। क्या आसपास कोई काम है?
एक असंबंधित अवलोकन। आपके कॉन्फ़िगरेशन में 'daoAuthenticationProvider' और' प्रमाणीकरण प्रबंधक 'का उपयोग नहीं किया जा रहा है। –