D
Dom
Hi,
I am using Form-Based Authentication with Struts and Tomcat.
When I log in I want to first process the form through struts and then
force the container security framework to authenticate the user
through a sendRedirect. The reason why I want to do this is because if
the user checks the remember me option I can then set up a cookie to
store their typed in username and password.
My login.jsp is:
<html:form action="login.do">
Username:<html:text name="loginForm" property="j_username"/><br>
Password:<html:text name="loginForm" property="j_password"/><br>
<html:submit property="whichAction"
title="Submit">Submit</html:submit>
</html:form>
My code that processes this form in LoginAction:
LoginForm loginForm = ((LoginForm)form);
String auth = "j_security_check?j_username=" +
loginForm.getJ_username() + "&j_password=" +
loginForm.getJ_password();
response.sendRedirect(auth);
The sendRedirect does not work. How do I make struts understand that I
want it to process the container "j_security_check"?
Can someone help please?
Dom
I am using Form-Based Authentication with Struts and Tomcat.
When I log in I want to first process the form through struts and then
force the container security framework to authenticate the user
through a sendRedirect. The reason why I want to do this is because if
the user checks the remember me option I can then set up a cookie to
store their typed in username and password.
My login.jsp is:
<html:form action="login.do">
Username:<html:text name="loginForm" property="j_username"/><br>
Password:<html:text name="loginForm" property="j_password"/><br>
<html:submit property="whichAction"
title="Submit">Submit</html:submit>
</html:form>
My code that processes this form in LoginAction:
LoginForm loginForm = ((LoginForm)form);
String auth = "j_security_check?j_username=" +
loginForm.getJ_username() + "&j_password=" +
loginForm.getJ_password();
response.sendRedirect(auth);
The sendRedirect does not work. How do I make struts understand that I
want it to process the container "j_security_check"?
Can someone help please?
Dom