How to build the project depends on a number of things.
You should be able to build the project from the command line by running ant and giving an appropriate target. For the script you posted at
https://coderanch.com/t/570797/vc/do-edited-servlet you would run either:
ant recompile
or
ant compile
Which one you do depends on whether you want to do a clean before a compile or not. If you don't do the clean, only the changed code will re recompiled. Not that recompiling only changed code has the possibility of causing various problems. Personally, I always clean and then compile.
Back to the "how to compile" question, you might be able to compile from within Eclipse, but that all depends on whether the Eclipse project is set up to use Ant to build the app. To find that out, right-click the project in Eclipse, select Properties and look under Build. If one of the Builders has an icon that looks like an ant, then Ant is being used for the build.
After the build, there will be either a directory containing the web app contents, or there will be a WAR file (based on your build.xml, there is no WAR file). Deploying the app requires that you copy the web app to the server.