This post[1] will help you understand your issue. Basically you should do a redirect and not a forward. Regards, Gilberto [1] https://stackoverflow.com/q/2047122/269514
Em qua., 14 de ago. de 2024 às 09:07, <users-digest-h...@tomee.apache.org> escreveu: > > users Digest 14 Aug 2024 12:07:35 -0000 Issue 3955 > > Topics (messages 28406 through 28406) > > when exit of application I can't newly do login using DataSourceRealm > 28406 by: Fernando > > Administrivia: > > --------------------------------------------------------------------- > To post to the list, e-mail: users@tomee.apache.org > To unsubscribe, e-mail: users-digest-unsubscr...@tomee.apache.org > For additional commands, e-mail: users-digest-h...@tomee.apache.org > > ---------------------------------------------------------------------- > > > > > ---------- Forwarded message ---------- > From: Fernando <fernandoagu...@gmail.com> > To: users@tomee.apache.org > Cc: > Bcc: > Date: Wed, 14 Aug 2024 09:06:51 -0300 > Subject: when exit of application I can't newly do login using > DataSourceRealm > Hi all, > I am experimenting a rare behaviour with my application, when one user > logout and try login newly, fails! > I did the same question on other forums, where I received that " when you > use JEE-standard Container security, the user should not explicitly request > the login/loginfail pages. It won't work right." however I did that works > with others jee servers, then I start to think that maybe is something > misconfigured in Apache Tomee. > In details, this is happening: > when one user exit from application and try to do login newly, this one > thrown this error: > > > * http://localhost:8080/appweb/privado/j_security_check > <http://localhost:8080/appweb/privado/j_security_check> * > > But if in the address bar, I delete the portion that says "/private/logout" > then it starts correctly! > In servlet that execute when the user choice exit I do this: > HttpSession session = request.getSession(); > session.invalidate(); > > request.getRequestDispatcher("/login.jsp").forward(request, response); > > Any Ideas what is happening? > Thanks in advance any suggestion! > Regards >