官术网_书友最值得收藏!

Deploying our first application

NetBeans comes pre-configured with a number of sample applications. To make sure everything is configured correctly, we will now deploy one of the sample applications to the integrated GlassFish application server that comes bundled with NetBeans.

To open the sample project, we need to go to File | New Project, then select Samples | Java EE from the Categories list in the resulting pop-up window. Once we have selected Java EE from the categories list, a list of projects is displayed in the Projects list; for this example we need to select the JavaServer Faces CDI project. This sample is a simple project involving both JSF and Contexts and Dependency Injection (CDI).

Deploying our first application

After clicking on the Next> button, we are prompted to enter a project location in the next pop-up window. In this case, the default value is sensible.

Deploying our first application

Once we click on the Finish button, our new project is displayed in the Projects window:

Deploying our first application

We can compile, package, and deploy our project at one go by right-clicking on it and selecting Run from the resulting pop-up menu.

Deploying our first application

At this point, we should see the output of the build script. Also, both the integrated GlassFish application server and the integrated JavaDB RDBMS system should automatically start.

Deploying our first application

As soon as our application is deployed, a new browser window or tab automatically starts, displaying the default page for our sample application.

Deploying our first application

If our browser is displaying a page similar to the preceding one shown, then we can be certain that NetBeans and GlassFish are working properly and we are ready to start developing our own Java EE applications.

主站蜘蛛池模板: 双柏县| 永城市| 白城市| 正镶白旗| 申扎县| 宝应县| 漯河市| 红河县| 石柱| 玉环县| 红原县| 白水县| 阳高县| 长治市| 白沙| 班戈县| 吐鲁番市| 常熟市| 延津县| 新余市| 文山县| 海安县| 板桥市| 静海县| 临漳县| 吴堡县| 婺源县| 厦门市| 商都县| 玛曲县| 民县| 垦利县| 中超| 阳朔县| 利辛县| 二连浩特市| 绵阳市| 永定县| 卓尼县| 武穴市| 额敏县|