Java Reference
In-Depth Information
5 Apache CXF and Tomcat Server
Objectives
After completing this chapter, you should be able to:
1.
Develop a Java Web Application
2.
Package a Web Application
3.
Deploy a Web Application to Apache Tomcat 7 server
Deploying a Web Service using JDK alone is not adequate for large and complex systems.
In this chapter, we will learn to develop and deploy Web Services using Apache CXF Web
Services and Apache Tomcat server 7. Tomcat is an open source software program that im-
plements Java Servlet and Java Server Page (JSP) technologies.
Apache CXF can be downloaded from Apache's website http://cxf.apache.org . Follow the
download and installation instructions for your machine. The CXF WS project includes
many of its Java libraries. The list of required libraries is shown in this section.
5.1 Configuration Parameters
The default port used for the Tomcat server is 8080. We keep this default for the Tomcat serv-
er that hosts the sample application we developed in the previous chapter. In fact, we use all
of the default values that come with the Tomcat server.
5.2 Apache Tomcat Server
To run a Tomcat 7 server, go to the apache-tomcat-7.0.12/bin directory and run startup.cmd or
startup.sh.
5.3 Develop CXF Web Service
Developing a Web Service using the Apache CXF software package is similar to that of the
reference implementation that comes with the JDK.
Search WWH ::




Custom Search