|By Ajay Acharya, Mukesh Garg, and Marina Sum, January 23, 2007; updated: June 18, 2007 and January 7, 2008|
You can develop, deploy, and debug Web applications that are based on the Java 2 Platform, Enterprise Edition 5 (Java EE 5 platform) with NetBeans 6.0, an integrated development environment (IDE). A plug-in for Sun Java System Web Server 7.0 (henceforth, Web Server 7.0) is available as open source in NetBeans 6.0.
Note: The Web Server 7.0 plug-in for NetBeans 5.0 supports the J2EE 1.4 platform only, not the Java EE 5 platform.
This article describes how to install and use that plug-in in NetBeans 6.0 to develop and deploy Web applications to Web Server 7.0.
Note: The topic of Web application projects in NetBeans is outside the scope of this article. For details, see NetBeans online help.
|-||Installing Web Server 7.0 Plug-In|
|-||Registering Web Server 7.0|
|-||Starting Administration Server|
|-||Creating and Deploying Web Applications|
|-||Debugging Web Applications|
|-||Addendum: Web Server 7.0 Capabilities Supported by NetBeans 6.0|
Tip: To ensure access to the NetBeans IDE, Web Server 7.0 must be owned and installed by the same user who runs the NetBeans IDE.
Afterwards, do the following:
You have now installed the Web Server 7.0 plug-in in the NetBeans IDE.
Note: Though several screen shots in the rest of this article show NetBeans 5.0, they also apply to NetBeans 6.0.
Next, register Web Server 7.0 in NetBeans 6.0. Follow these steps:
If your Web Server 7.0 instance contains multiple configurations, when you first open its node in NetBeans 6.0, a dialog box with a drop-down list of the configurations that contain at least and at most one virtual server and one associated instance is displayed. See Figure 3. You must select one of those configurations for deployment from the IDE. This is a one-time selection only.
After registration, the Sun Java System Web Server 7.0 node is displayed under Servers in the Runtime tab of the IDE. To start the Administration Server, right-click the Sun Java System Web Server 7.0 node and choose Start from the context menu. See Figure 4.
Note: You cannot start the Administration Server if the server was registered as a remote server.
You can expand the nodes to view all the Web applications, resources, and so forth in a configuration. Figure 5 is an example.
To create a Web application for Web Server 7.0, follow these steps:
You can see that all the basic files are in place, including the Web Server 7.0-specific deployment descriptor, the
sun-web.xml file. To edit that file, double-click its name to open a GUI editor on the right. Alternatively, right-click its name and choose Edit from the context menu.
The Web application project is now ready: You can edit, compile, and deploy it to Web Server 7.0. You can also run or debug the application from the IDE.
You can debug Web applications by right-clicking the Web project in the IDE and choosing Debug from the context menu. Web Server will then start in debug mode and the IDE will stop executing the program at the breakpoint you have set in your application.
For details on debugging Web applications in NetBeans 6.0, see the IDE's online help.
Following are the Web Server 7.0 operations you can perform in NetBeans 6.0 with the plug-in installed:
server.xmlfile of the server instance. 1
1 This capability is not available for the remote server.