I have designed a fully function
struts application. I am at the point of implemeneting Validation for my application.
So for starters this is what I would like to do:
The entry point into my application is a logon page that prompts the user to enter a username, password, and database name (automatically populated in a drop down menu). The user then clicks on a Connect button that opens a database connection to the specified database. Everything works fine if the user enters valid data.
I now need to implement validation as below:
1. If the user doesn't enter anything for username or password.
2. If the user enters an invalid username or password.
I can do 1 using the validate method in my ActionForm. However I don't understand how the control flow for this works - as in how and what I need to change in my struts-config.xml and my
JSP page and my properties file.
I don't know where to start from for 2.
I'd greatly appreciate any assistance on 1 or 2 or both,