This is my first strut app and I am still not getting it right. It's a simple login app. Where if someone uses admin/visitor credentials, he/she gets to the login page for admin/visitor. Although in my case when I type in the login details, it is coming back to login page again. Please help
Please don't use Struts 1 unless you have a very good reason (i.e. you are maintaining a Struts 1 application and you cannot move to an alternative). It is past End of Life and will not be updated in the future.
Struts 2 is an alternative, but it is a very different framework (it is based on WebWork) and there are many others.
Let whoever made that requirement know that Struts 1 is unsupported and will not get security or bug fixes and that may change. Also, other, newer, frameworks also are much more productive uses of a programmer's time (form beans for instance).
As for your issue, I would assume if you are getting redirected back to your form, your validation is returning errors. It's a good idea to log method calls and the return values so you can see what's going on in your code.
By the way:
this code does not do what you think it does. see here.