返回介绍

Introduction

发布于 2025-02-22 22:20:10 字数 6045 浏览 0 评论 0 收藏 0

In this part of the JEE tutorials, we will talk about the goals of the tutorials and we provide some definitions.

About JEE tutorials

The JEE tutorials are a set of tutorials covering the Java Platform, Enterprise Edition. (JEE) The purpose of the tutorials is to introduce novice programmers to the JEE platform.

JEE programmer

Every good JEE programmer must acquire an enormous amount of knowledge. Everybody tells you what to study, but no one tells you how to study. One can easily be lost in all this tools, technologies, recommendations, libraries. There are many tools that help advance programmers develop their applications. But on the other hand, they bring additional complexity to development. Tools like XDoclet or Hibernate help advanced JEE programmers focus on the application logic, but necessarily make the learning curve steeper for a novice programmer. Have a look at the various Apache projects at www.apache.org . Ant, Cocoon, iBATIS, Struts, Maven, Tapestry, Xalan, Velocity. Just to name a few.

You cannot become a general, unless you were a private. You must go to the top, from the very bottom. There is no shortcut available. The best way for a novice programmer is a step by step approach. Pick one tool, library at a time and play with it. Realizing all this, I have made the tutorials to cope with all this complexity. We will begin with the very basic things like installing necessary tools, trying very simple JSP files or servlets.

Java Platforms

The world of Java is divided into the following three platforms.

  • Java Platform, Standard Edition, Java SE
  • Java Platform, Micro Edition, Java ME
  • Java Platform, Enterprise Edition, Java EE

The Java SE is the core Java technology platform. It is used to create Java desktop and server applications. The Java ME is aimed at creating applications for portable devices like cell phones or PDAs. The Java EE is a platform for creating large enterprise applications. It adds libraries necessary to create stable, secure, multi-tier, distributed applications.

Java EE

Java Platform, Enterprise Edition is a set of libraries, tools, specifications, best practices for developing, deploying and managing server side enterprise level applications.

Each application is executed on the application server. Some of the well known application servers are JBoss, OCJ, Resin, and WebLogic. In this tutorials, we will use Resin. To create and manage source code, developers use Integrated Development Environments, (IDEs). The most popular Java IDEs are NetBeans, Eclipse, JDeveloper, and IntelliJ IDEA.

The key technologies of the Java EE are:

  • Web Services Technologies
  • Web Application Technologies
  • Enterprise Application Technologies
  • Management and Security Technologies

To install all this technologies, we can go to sun download site, or we can download the NetBeans JEE pack. These technologies are included in this pack.

The Java Platform, Enterprise Edition is not limited to these technologies. The platform has a wide variety of additional tools and libraries. The numerous Apache projects are good examples.

The Java EE also consists of a set of best practices, coding styles, and software patterns.

Web Application

An enterprise application consists of web modules. These are packaged in war files. A war (short for Web Archive) file is jar file used to distribute a collection of JavaServer Pages, servlets, Java classes, XML files, tag libraries and static Web pages. They create a web application. Smaller web applications can be packaged in a war file.

All servlets, classes, static files, and other resources belonging to a Web Application are organised under a directory hierarchy.

Web application
Figure: Web application

The root directory of this directory structure is called the document root. Let's have a web application called email. For the Resin AS, the path to the document root would be:

RESIN_INSTALL_DIR/webapps/email 

We place our files and resources under the document root directory. All files are visible except for a special directory WEB-INF. All files under the WEB-INF directory are private and are not visible to the client. The WEB-INF directory is optional, but it is always created unless we create some very simple examples.

The WEB-INF directory contains two special files and two directories. The web.xml file is a web application deployment descriptor. It is used to configure the web application. The web.xml file is a Java EE deployment descriptor. It is defined by a specification. There is another type of descriptor called runtime deployment descriptor. It is used to configure Java EE implementation specific parameters. In the case of Resin Application Server, the runtime deployment descriptor is called resin-web.xml . In case of GlassFish AS it is called sun-web.xml .

The two special directories are named classes and lib. We place all compiled servlets and utility classes under the classes directory. The lib directory contains additional libraries in form of JAR files. These can be e.g. third party libraries like database drivers or XML parsers.

It is conventional to put tag files into the tag directory.

Tools

The tools that we use in the JEE tutorials are:

  • JDK 1.6
  • NetBeans 6
  • Resin application server
  • MySQL database

This was an introduction to JEE.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文