It's because now your login page is considered a secure page and it's not allowing you to display it. Try changing your filters to:
<filter-mapping> <filter-name>FiltroFilterChainProxy</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping> <filter-mapping> <filter-name>FiltroFilterChainProxy</filter-name> <url-pattern>/j_acegi_security_filter</url-pattern> </filter-mapping> I believe you could also change some of the settings in your security context and achieve the same effect, but this should get you going. (*Chris*) On 7/31/07, Gerardo Corro <[EMAIL PROTECTED]> wrote: > > Thanks, but not working yet; when invoking the page > http://localhost:8080/login_demo/ the same error appear time after time, even > trying to invoke directly the page > http://localhost:8080/login_demo/userLogin.jsp shows the same error.these are > the settings right now:#############web.xml############ <filter> > <filter-name>FiltroFilterChainProxy</filter-name> > <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class> > <init-param> <param-name>targetClass</param-name> > <param-value>org.acegisecurity.util.FilterChainProxy</param-value> > </init-param> </filter> <filter-mapping> > <filter-name>FiltroFilterChainProxy</filter-name> > <url-pattern>/*</url-pattern> </filter-mapping> <servlet> > <servlet-name>action</servlet-name> <servlet-class> > org.apache.struts.action.ActionServlet </servlet-class> > <init-param> <param-name>config</param-name> > <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> > <init-param> <param-name>debug</param-name> > <param-value>2</param-value> </init-param> <init-param> > <param-name>detail</param-name> <param-value>2</param-value> > </init-param> <init-param> > <param-name>validate</param-name> <param-value>true</param-value> > </init-param> <load-on-startup>2</load-on-startup> </servlet> > <welcome-file-list> <welcome-file>userLogin.jsp</welcome-file> > </welcome-file-list>################struts-config.xml###############<?xml > version="1.0" encoding="UTF-8"?><!DOCTYPE struts-config PUBLIC "-//Apache > Software Foundation//DTD Struts Configuration 1.1//EN" > "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><struts-config> > <data-sources /> <form-beans > <form-bean name="userLoginForm" > type="com.xxx.yyy.struts.form.UserLoginForm" /> </form-beans> <!-- > Global Exception Definitions --> <global-exceptions> <exception > key="errors.acegi.accesoDenegado" > type="org.acegisecurity.AccessDeniedException" > handler="com.xxx.yyy.struts.exceptions.AcegiExceptionHandler" /> > </global-exceptions> <!-- Global Forward Definitions --> > <global-forwards> <forward name="error" > path="/WEB-INF/page/error.jsp"/> <forward name="errorAcegi" > path="/WEB-INF/page/errorAcegi.jsp" /> </global-forwards> > <action-mappings > <action attribute="userLoginForm" > input="/userLogin.jsp" name="userLoginForm" path="/userLogin" > scope="request" type="com.xxx.yyy.struts.action.UserLoginAction"> > <forward name="success" path="/WEB-INF/page/userLoginSuccess.jsp" /> > <forward name="failure" path="/userLogin.jsp" /> </action> > </action-mappings>#############userLogin.jsp############ <html:form > action="/j_acegi_security_check" name="userLoginForm"> username : > <html:text property="j_username" name="j_username" /> <html:errors > property="j_username" /> <br /> password : > <html:password property="j_password" name="j_password" /> > <html:errors property="j_password" /> <br /> > <html:submit /> </html:form>#############securitycontext############ > <bean id="authenticationProcessingFilter" > class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"> > <property name="authenticationManager"> <ref > local="authenticationManager" /> </property> <property > name="authenticationFailureUrl"> > <value>/userLogin.jsp?login_error=errors.credenciales.novalidos</value> > </property> <property name="defaultTargetUrl"> > <value>/</value> </property> <property > name="filterProcessesUrl"> <value>/j_acegi_security_check</value> > </property> > </bean>################UserLoginAction.java############### public > ActionForward execute( ActionMapping mapping, > ActionForm form, HttpServletRequest request, > HttpServletResponse response) { ActionMessages > messages = new ActionMessages(); ActionMessage message = new > ActionMessage(""); Authentication authentication = > ((SecurityContext)request.getSession().getAttribute("ACEGI_SECURITY_CONTEXT")).getAuthentication(); > UsuariosDao usuarios = > (UsuariosDao)SpringFactory.getBean("usuariosDaoHbn"); Usuarios > usuario; try { usuario = > usuarios.findWhereUsuarioEquals(authentication.getName()); } catch > (UsuariosDaoException e) { log.error( e); usuario=null; > } if (usuario != null){ > request.getSession().setAttribute("usuario",usuario); return > mapping.findForward("success"); }else{ message = > new ActionMessage("error.validar.usuario"); > messages.add("validarUsuario",message); > saveMessages(request,messages); return > mapping.findForward("failure"); } }Thanks for your > help!!!!> Date: Tue, 31 Jul 2007 09:25:17 -0700> From: [EMAIL PROTECTED]> To: > user@struts.apache.org> Subject: Re: Struts+Acegi not working> > > > <filter-mapping>> > > <filter-name>FiltroFilterChainProxy</filter-name>> > > <url-pattern>*.do</url-pattern>> > </filter-mapping>> > You have the > Acegi Filter mapped to *.do, so it's not going to be> called when the request > for j_acegi_security_check comes in. It's> being passed straight on to > struts, and since you don't have an action> mapped to j_acegi_security_check > either, you're getting that> exception.> > > javax.servlet.ServletException: > Cannot retrieve mapping for action /j_acegi_security_check> > Try changing > your filter-mapping to /*> (*Chris*)> > > ---------------------------------------------------------------------> To > unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: > [EMAIL PROTECTED]> > _________________________________________________________________ > Make every IM count. Download Windows Live Messenger and join the i'm > Initiative now. It's free. > http://im.live.com/messenger/im/home/?source=TAGWL_June07 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]