The continuing part of the series that looks at developing an application first using Java and then migrating to an interface using a Web interface, through a variety of methods, is now available to read. This second part of the series looks at the main Java application itself and a servlet version.The series is split into six parts:
- Part 1 looks at the application and sets up an environment ready for building Java applications and serving Java-based Web applications using Tomcat.
- Part 2 covers the main application code and the development of a simple Java Servlet to provide a Web interface to the information.
- Part 3 connects the core application to a DB2 database for the storage of the survey questions and responses.
- Part 4 converts the original application into one that can be accessed as a Web service, and it provides the base for the PHP interface.
- Part 5 builds the PHP interface to the Java application by using the PHP Java Bridge.
- Part 6 redevelops the application to make use of the PHP Java Bridge in place of the Web service interface.
For this second part: In this tutorial, Part 2 of the series, we are going to build a basic business application based around the Survey application we first examined in Part 1. Once we have a working version of the application in a standalone format we will then examine how to build and develop a web-based alternative that uses Java Servlets.The tutorial will cover the following points:
- Building the base Survey application.
- Building a simple Web servlet.
- Building an interface to our Survey application using a Servlet.
- How to deploy the servlet to our web application server.
We’ll start by building the Survey application, including providing the base class and extending the class with the question specific elements. The completed application will form the basis of the remaining examples for the rest of the series. Read: Develop with Java and PHP technology on AIX Version 5.3, Part 2: Building the Java business application