The fact that your JavaScript is being displayed could mean that you've put it in the wrong place in your JSP. In my experience, the best place to put it is directly before your </html:form> tag.
A coupld of more things to mention:
1-By overriding the validate() method with your own logic, you have overridden the Struts Validator Framework logic. I'd suggest removing this method.
2-
You should specify validate="true" in your action mapping in the struts-config.xml file to make sure that validation is performed for that action.