Currently for debugging, I am taking the entered data and displaying it on the screen (using doGet() function). So, what is happening is even if user does not enter something correctly, the Servlet is being executed and the index.html transitions.
The application I am developing is as below:
1) User enters data
2) Data has to be written to a word document
3) Document has to be emailed to a particular email address
If I had to guess, perhaps you are having trouble dealing with the server-side validation? If validation fails, you'd pack up the submitted values in the session and redirect back to the page (or page controller) with the form, filling in the values in the form elements using their value attributes.