-
1. Re: j_security_check
felderr Mar 23, 2005 8:34 AM (in response to milkygto)Hello,
you can implement your own Authenticator. For Tomcat look at the implementation:
org.apache.catalina.authenticator.FormAuthenticator
Redirection to CONTEXT_ROOT/j_security_check should work. I used the following within Struts:
response.sendRedirect(contextPath + "/j_security_check?j_username=" + loginForm.getUsername() + "&j_password=" +loginForm.getPassword());
Rene -
3. Re: j_security_check
nabatzis Apr 1, 2005 9:17 AM (in response to milkygto)I am really having problems with j_security_check and STRUTS!
Rene,
Where do I put the redirect statment you mentioned earlier, should it go to the LoginAction class before the return mapping.findForward(IConstants.SUCCESS_KEY);
and,
how do I finally get to my "main" page after the j_security? Do I go the usual route via the struts-config.xml, i.e. define an action and go on frm there?
I hope I am not being a pain but I have a due date coming up and my a.. is on fire!!!! -
4. Re: j_security_check
ricardoarguello Apr 1, 2005 12:54 PM (in response to milkygto)After authenticating with JAAS (posting to j_security_check) Tomcat redirects you to the page you intended to go in the first place. You can't control which page to go after you authenticate, If you try to go to /home.jsp and you have not authenticated yet, you get a login prompt. If you provide the correct user/password, you are redirected to /home.jsp, the one you intended to go to.
Ricardo Arguello -
5. Re: j_security_check
jaejong Apr 19, 2005 7:28 AM (in response to milkygto)response.sendRedirect("CONTEXT_ROOT/j_security_check") will not work on jboss-4.0.0 with tomcat-5.0.28 but jboss-3.2.6 with tomcat-5.0.28 work well.
I can see 'GenericPrincipal[admin(admin,user)] in both versions.
When I call IsUserInRole("admin"), it returns true on 3.2.6 but false on 4.0.0.
Are there deferences between two versions? -
6. Re: j_security_check
ricardoarguello Apr 19, 2005 9:17 AM (in response to milkygto)"jaejong" wrote:
When I call IsUserInRole("admin"), it returns true on 3.2.6 but false on 4.0.0.
Are there deferences between two versions?
That's a known 4.0.0 bug, please try 4.0.1 or 4.0.1SP1, the latest release.
Ricardo Arguello