I am trying to develop a web application using Struts and have given validations in the user registration page using validate() method. The validations are working fine if I declare the registration page as welcome page in web.xml. But if I declare the user login page as welcome page in web.xml and later redirect to the registration page, the validations of the registration page are not working. I have mentioned each error messages properly in .properties file. Please help me...
That's a heck of a lot of code to plow through. We're all volunteers here and the likelihood of someone having the free time to dig through your 500 line post is pretty unlikely. Can you pare your code down to the bare essentials?
Sometimes, Isolating The Problem gives you the insight to solving it.
Sorry Joe if I made a mess while posting the problem. Please let me give a few sentences to explain where my problem is. I am just putting the scenario in as brief as possible.
In my web application using Struts I used form bean which extends ValidatorForm and used validate() method for server side validation purpose in new user registration page. All kinds of validation are working fine if I declare welcome page as "Registration.jsp" in web.xml like below.
web.xml (when the validations are working):
But if I put the home page i.e. the Login.jsp page as welcome page in web.xml like below and redirect to Registration.jsp page whenever new user wants to register then the none of the validations are working. Even when I am submitting the empty form, it's redirecting to the Login page.
web.xml (when the validations are not working):
Please let me know if I have clearly pointed out this peculiar problem. Expecting a solution from you about this very eagerly.
In addition I have shown you the validate method which is used for registration form validation.