Building Web applications with Eclipse, WTP, and Derby

Source: Internet
Author: User
Tags tomcat

Brief introduction

Eclipse is an ideal platform for developing WEB applications using Java technology. The 3-tier design of a dynamic WEB application is ideal for combining the JSP and servlet running in a servlet container, such as Apache Jakarta Tomcat. Persistent data tiers can be provided appropriately by the Derby database. The Eclipse Web Tools Platform (WTP) Project toolset for developing Java EE and Web applications, plus the Derby Eclipse plug-in, can provide fast and easy web development.

This article discusses some of the features provided by WTP, the Derby database plug-in, and a complete sample application that uses JSP, JavaServer Pages Standard Tag Library (JSTL), and Servlets. This sample application is a virtual, streamlined airline ticket booking system.

To make better use of this article, you should understand the basics of JSP, JSTL, and Servlet technology, understand simple SQL, and have some knowledge of Eclipse. Some of the features of WTP are also used in this article, but this article is not a comprehensive tutorial on the WTP tool. If you already know some of the WTP background and want to start downloading all the necessary software directly, skip the software Requirements section. Otherwise, read the next section to see what WTP is, and how to use some of these components in Eclipse to develop the sample application.

IBM Cloudscape is a commercial release of the Apache Derby open source database. If you do not refer to a particular file or name, the two names can be used interchangeably in this article.

Eclipse WTP Project

The Eclipse Web Tools Platform (WTP) project allows eclipse users to develop Java EE Web applications. This platform includes multiple editors, graphics editors, features, builders, a WEB Services wizard, database access and query tools, and other components. The project provides a large number of tools. While using Derby as a background database to build a WEB application, only a limited number of tools are demonstrated.

The WTP concession on Www.eclipse.org/webtools is defined as follows: "... Build useful tools and a common, scalable, standards-based tool platform on which software vendors can create specialized, different solutions to generate WEB-enabled applications. "This article does not discuss building new tools for this platform, but rather uses it as an open platform for building WEB applications using open source components."

Web Standard Tools and Java EE Standard tools

WTP is divided into two subprojects, Web Standard tools and Java EE Standard tools. The Web Standard Tools (WST) project provides a common infrastructure for multi-tier Web applications. It provides a server view that allows you to publish resources created in Eclipse and run them on a single server. WST does not include specific tools for the Java language, nor does it include specific tools for WEB-specific technologies.

The Java EE Standard Tools (JST) project provides tools for simplifying the development of Java EE APIs, including EJBs, Servlet, JSP, JDBC, Web services, and so on. The Java EE Standard Tools project is based on the Server tools support provided by the WEB Standard Tools project, including the servlet and EJB containers.

The next section discusses the software components needed to build and run the sample application.

Components of a WEB application

The sample application uses the following software components and technologies:

Eclipse

Use the IDE to write and run the sample application. It is the foundation for developing and building Java applications.

Use the Java Development Tools (JDT) included with Eclipse to compile Java classes that are part of your application.

Wtp

Use the editor to create a JSP file. This editor includes content assistance for JSP syntax.

Use the Servers view to start and stop the external Jakarta Tomcat servlet engine.

Use the Java EE perspective to create a dynamic Web application that assembles and configures the Java EE Web application, including the same standard structure and deployment descriptor as all Java EE Web applications.

Create a connection to the Derby database by using the database Explorer view.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.