If you want to build a new webapp from scratch you should use a building tool and a framework for the webapplication part.
I suggest using maven as building and dependency management tool.
With maven you just have to configure which libraries you want to use and it will download the library and it's sources (if available) automatically for you. Even the classpath is handled by maven.
As Framework for webapplications Spring-MVC is a good choice.
Just go to the spring-mvc homepage and get the needed dependencies for maven and you have everything you need to start.
To get Spring to work in the application server you have to do the following:
In the Controller classes you can now register methods for specific URLs.
Now you have everything you need for a REST web application.
For a more detailed description of each step look at the official spring tutorial: http://docs.spring.io/docs/Spring-MVC-step-by-step/