But I want to use the default form-based login (in web.xml) I'll try to explain my problem better. When you enter the page, the login form appears, becuase of this:
<login-config> <auth-method>FORM</auth-method> <realm-name>my realm</realm-name> <form-login-config> <form-login-page>/LoginForm.jsp</form-login-page> <form-error-page>/LoginError.jsp</form-error-page> </form-login-config> </login-config> Once you write your username and password, the index page appears. Up to now, nothing strange. Now, if the session expires and you want to go to a page, the login page turns up, all right. At this moment, once you write the username and password, the index page doesn't turn up, but the page where you wanted to go turns up. In conclusion, I don't want struts (or tomcat or whatever) to remember what page I wanted to go to. Just I want it to go to the index page. thanks David -----Mensaje original----- De: Jose Cardoso [mailto:[EMAIL PROTECTED] Enviado el: martes, 25 de julio de 2006 14:10 Para: Struts Users Mailing List Asunto: RE: A problem with form-based login 1- Create a jsp page where you will allow for the typping of username and password lets call this page login.jsp 2- in the login.jsp, within the body tag call the struts-config.xml: <html:form action="login.do" focus="userName"> 3- In the struts-config.xml define the action: for example: <action path="/login" type="com.asb.LoginAction" --> This is your action class where you will check if password/username combination is valid name="loginForm" ----> this is your actionForm with getters, setters and valid methods scope="request" input="/login.jsp" validate="true"> <forward name="failure" path="/login.jsp"/> --> if password/username not valid return here <forward name="success" path="/Menu.jsp"/> ---> else go here. </action> I hope this is what you want or at least puts you in the right direction. Jose Cardoso jr -----Original Message----- From: David Soler [mailto:[EMAIL PROTECTED] Sent: 25 July 2006 12:27 To: user@struts.apache.org Subject: A problem with form-based login Hi, I have a problem with form-based login. This way of login remembers the page where you want to go when the session expires, but I don't want this. I always want it to go to the index page, because the index page must do some operations before entering the page. Somebody knows how to do it? Thank you David P.S.: I'm sorry if my English is poor, I'm learning. ********************************************************************** London Borough of Tower Hamlets E-Mail Disclaimer. This communication and any attachments are intended for the addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed. ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]