现在学习acegi,发现action为j_security_check,请问这个是在什么地方定义的阿?

解决方案 »

  1.   

    今天怎么突然出来这么多关于acegi的问题
      

  2.   

    这是J2EE中的JASS, 安全机制. 已经封装好的Servlet
      

  3.   

    我知道了,只要跟<property name="filterProcessesUrl" value="/j_security_check"/>就可以了
      

  4.   

    如果是JSP/Servlet那不用定义,如果你用的是struts那要在struts-config.xml里面定义
      

  5.   

    to wangx1949()  是用的struts,但是在struts-config.xml里确实没有
      

  6.   

    在<property name="fileterProcessesUrl">
         <value>/j_security_check</value>
     </property>
    其中/j_security_check是可以改变的
      

  7.   

    Acegi的用户登录很有意思,为了不让用户写任何这方面的代码,它也直接把这个功能放到Filter里了,这个Filter叫做authenticationProcessingFilter。这个Filter的要求是页面上的form的Action名字,登录名、密码的字段名都是定死的。一个简单的页面就这些啦:
      
     <!-- ===================== HTTP REQUEST SECURITY ==================== -->
       <bean id="authenticationProcessingFilter" class="net.sf.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
          <property name="authenticationManager"><ref bean="authenticationManager"/></property>
          <property name="authenticationFailureUrl"><value>/login.jsp?login_error=1</value></property>
          <property name="defaultTargetUrl"><value>/index.jsp</value></property>
          <property name="filterProcessesUrl"><value>/j_acegi_security_check</value></property>
       </bean>
      

  8.   

    authenticationManager 认证管理器
    authenticationFailureUrl 认证失败后,重定向的url
    defaultTargetUrl 认证成功后,重定向的url
    filterProcessesUrl
    该过滤器拦截的url,通常是/j_acegi_security_check,和登录页面(login.jsp)的登录表单的action相同
      

  9.   

    有谁知道在struts下,需要在struts-config.xml里面还要定义些什么东西呢?
    我按照要求,在web.xml里面定义了filter,在spring的配置里面也定义了/j_acegi_security_check的处理,但没在struts里面做任何事情,结果就是“无法找到该页”,哪位朋友能帮帮忙