The thing is that in testHandler class I can't user tomcat antlib I always have this error :
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet
I can see the echo outputs problem starts with <tomcat:deploy ....
I can't tell what is going on from your post. What name is the error complaining of? Seeing the target which generated the error, and all of the output for that target would help. Also, have you tried running with the -v option? That might give more clues as to what is going on.