I am new to j_security_check tomcat. However i implemented login functionality(form based authentication) using login filter & some settings in web.xml. When we trying to access a secured page, tomcat redirects to login page. After providing credentials it redirects user to a page which user tried to access. So far it is working as expected.
But, the new requirement is: User access a non-secured page (public page), there he can enter his login username & login password. On submitting this page we have to do
- create a user with details provided by the user(save to DB)
- auto login the user and redirect to a secured home page.
the 1st point has already been implemented and working fine. After inserting new user i am redirecting to secured home page. Then container shows a login page where user can enter his credentials, the submit action of login page takes user to secured page.
But i want to redirect user to secured home page after saving his details to DB as we have his username & password i.e. non-secured page to secured page without login page interruption. I want to use container managed authentication only.
Any ideas??
Thanks in advance.