Configuring the IDE for Java EE Development


To explore all the capabilities of NetBeans IDE related to Java EE application and web services development, you need to make sure your environment is correctly configured. If you have downloaded the bundle containing both NetBeans IDE and Sun Java System Application Server, you have a preconfigured development environment, and you can skip the following steps. If you have downloaded a standalone NetBeans IDE, you will also need to install Sun Java System Application Server. Version 8.2 is available from http://java.sun.com/j2ee/1.4/download.html. This application server is the core of the J2EE 1.4 SDK and is free for development, deployment, and redistribution.

Before you can deploy an enterprise application, web application, JSP page, servlet, or EJB module, the server to which you are going to deploy needs to be registered with the IDE. By default, only the bundled Tomcat web server is registered with the IDE and this is not a complete Java EE server.

To register a Sun Java System Application Server instance:

  1. In the IDE, choose Tools | Server Manager.

  2. In the Server Manager, click the Add Server button. The Add Server Instance wizard (shown in Figure 10-1) appears and displays the types of servers that are compatible with the IDE.

    Figure 10-1. Add Server Instance wizard, Choose Server page

  3. On the Choose Server page of the wizard, select the type of server you want to register (the type called "Sun Java System Application Server" works for versions 8.1, 8.2, and version 9.0 aka GlassFish Server) and click Next.

  4. On the Platform Folder Location page (shown in Figure 10-2), specify the local installation of the server and keep the default configuration for registering a local default application server.

    Figure 10-2. Add Server Instance wizard, Platform Folder Location page

  5. On the Domain Admin Login Info page of the Add Server Instance wizard, specify server-specific information in the panels that follow and click Finish. (Remember that the Admin username is admin and the default password is adminadmin, unless you picked a different one at installation time.)

When you register a server in the IDE, you make its libraries available for production, deployment, or both. If you deploy your applications to a remote instance of the Sun Java System Application Server, its libraries are available at runtime. However, during development, you might need a local instance of this server. You can have multiple instances of the Sun Java System Application Server registered with the IDE. Once you have registered your local instance, you can open the wizard again to register remote instances (by entering a remote machine name and its port number in the Platform Location field of the Platform Folder Location page of the wizard).

When a server is registered in the IDE, you can see its node in the Runtime window under the Servers node. When you create a project in the New Project wizard, you select the server to which you want to deploy your application. After you create the application, you can change the server by right-clicking the project, choosing Properties, clicking the Run node, and selecting a different server.

Now you are ready to create web services, enterprise beans, and Java EE applications.



NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net