Version 67

    Java&153;EE Development in NetBeans&153;IDE 4.1


    NetBeans IDE 4.1 provides complete development support for the Java&153; 2 Platform, Enterprise Edition 1.4 Specification (J2EE&153; platform 1.4), including Enterprise JavaBeans&153;, web tier, and web services technologies. Besides features supporting the Java&153; programming language, such as a code editor with advanced code completion support, refactoring, and a project system based on the Apache Ant build tool, the NetBeans IDE includes Java SE 5 support, versioning system integration, XML editor, debugger, and online updates.


    It provides a rich set of features for J2EE development, including the following:


    • Predefined projects for web module, EJB&153; module, and J2EE application

    • Ant-driven build and deploy system

    • Import of J2EE project types from existing sources, potentially taking advantage of an existing Ant script

    • Wizards for creating J2EE components: session beans, entity beans, message driven beans, JSP&153; components, servlets, tag libraries, tag files, filters, web services, message handlers and more

    • Wizard for creating a set of CMP entity beans using an existing database schema

    • One click deployment and debugging for JBoss, Tomcat, Sun Java System Application Server, and other servers in the future

    • High level operations on J2EE components, such as "Add business method", "Add web service operation", "Call EJB" or "Call Web Service"

    • Automatic management of deployment descriptors

    • Code editor for JavaServer Pages&153; (JSP) technology, tag files, and XML files

    • Visual editor for deployment descriptors

    • Debugging of JSPs directly in JSP source

    • HTTP monitoring tool to monitor HTTP transactions

    • Fast error checking using the J2EE Verifier and using the JSP compilation tool

    • Integrated Java BluePrints Solutions Catalog containing solutions for common problems and patterns, comprehensive set of sample projects


    For a full set of features in NetBeans IDE 4.1, see  this page.


    How to set up NetBeans&153;IDE 4.1 with JBoss


    For NetBeans IDE 4.1, you need to get the JBoss plug-in for NetBeans IDE from the Update Center. See how easy it is to get the JBoss plug-in for NetBeans from the Update Center. If you are using a post-4.1 development build, the JBoss plug-in is bundled with the product and you do not need to take any special steps to install the plug-in.


    Before you can deploy your applications to JBoss, you need to register your JBoss installation in NetBeans IDE. It's very easy to do, because a wizard does all the work for you:


    1. In the IDE, choose Tools > Server Manager in the main menu. The Server Manager appears.

    2. In the Server Manager, click Add Server. You will see this dialog box:

    3. Select JBoss Application Server 4.0, click Next, and use the wizard to fill in the server's installation directory, domain, host, and port number.

    4. Click Finish and Close. In the Runtime window (Ctrl-5) you can now see a new node for JBoss. When you right-click it, you can see the actions that are available to JBoss in NetBeans IDE:


    Developing J2EE&153; applications with NetBeans IDE 4.1 and JBoss


    When you create a web module, EJB module, or J2EE application in NetBeans IDE, the New Project wizard lets you choose the server to which your applications will be deployed. Again, a wizard guides this procedure:


    1. In the IDE, choose File > New Project (Ctrl-Shift-N) in the main menu. The New project wizard appears. Select Enterprise Application:

    2. Click Next and select JBoss in the Server drop-down:

    3. Click Finish. The J2EE application, containing an EJB module and a web module, opens in the IDE. Expand the nodes in the Projects window and notice that the JBoss-specific deployment descriptors have automatically been created for you:

    1. After you finish developing the J2EE application, right-click the J2EE node (as shown above) and choose Run Project to deploy the project to JBoss. Of course, you can change your mind and choose a different server. To do this, right-click a project node and choose Properties, then go to the Run panel.


    For details on developing J2EE applications in NetBeans IDE, see the NetBeans IDE 4.1 Quick Start Guide for J2EE Applications. A NetBeans version of the J2EE Tutorial is also available -- it presents the J2EE Tutorial's chapters on EJBs and web services from the perspective of the NetBeans IDE. Full source code for all examples is included in a downloadable ZIP file. See the The J2EE Tutorial for NetBeans IDE 4.1 for details.