I downloaded the source codes of the book "Java Web Services - Up and Running".
I modified the build.xml file of the first chapter in order to make it to run with Wildfly-10.1.0.Final.
I run the build.xml file as
Ant build in Eclipse and get the following output:
compile:
[javac] /home/akao/workspace/Java Web Services - Up and Running/ch1/jspService/build.xml:164: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 2 source files to /home/akao/workspace/Java Web Services - Up and Running/ch1/jspService/build/WEB-INF/classes
[javac] /home/akao/workspace/Java Web Services - Up and Running/ch1/jspService/src/predictions/Predictions.java:9: error: package javax.servlet does not exist
[javac] import javax.servlet.ServletContext;
Eclipse version is
Java EE
IDE for Web Developers.
Version: Neon.1a Release (4.6.1)
Build id: 20161007-1200
$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Server VM (build 25.121-b13, mixed mode)
$ ant -version
Apache Ant(TM) version 1.10.1 compiled on February 2 2017