I get a TimeOut error when I try to validate my login form BUT only the first time. Could you tell me what I'm doing wrong?
My [...]-validation.xml :
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
<validators>
<field name="identifiant">
<field-validator type="requiredstring">
<message>Veuillez saisir votre identifiant</message>
</field-validator>
</field>
<field name="motDePasse">
<field-validator type="requiredstring">
<message>Veuillez saisir votre mot de passe</message>
</field-validator>
</field>
</validators>
The stackTrace :
[com.opensymphony.xwork2.validator.AnnotationActionValidatorManager]
**Caught exception while loading file com/myApp/action/LoginAction-validation.xml
Connection timed out** - [unknown location]
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:119)
at com.opensymphony.xwork2.validator.DefaultValidatorFileParser.parseActionValidatorConfigs(DefaultValidatorFileParser.java:82)
at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:394)
[...]
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
{...]
The server was not able to access to Internet. So the DTD had to be copied and referenced locally.
Thanks to Roman C. for the clue.