Chapter 8. Developing Web Applications


  • Representation of Web Applications in the IDE

  • Web Application Structure

  • Adding Files and Libraries to Your Web Application

  • Editing and Refactoring Web Application Files

  • Deploying a Web Application

  • Testing and Debugging Your Web Application

  • Creating and Deploying Applets

  • Changing the IDE's Default Web Browser

  • Monitoring HTTP Transactions

NETBEANS IDE IS AN IDEAL ENVIRONMENT for developing web applications. The IDE eliminates many of the nuisances you normally would encounter, particularly in setting up the application and in the steps between coding, deploying, debugging, and redeploying your application. And because Ant is the basis for this automation, there are no proprietary mysteries you need to unravel if you want to make the project work without the IDE as an intermediary.

Following are some of the things the IDE does to make web application development easier:

  • Provides a built-in Tomcat web server on which to deploy, test, and debug your applications.

  • Sets up the file and folder structure of a web application for you.

  • Generates and maintains the content of deployment descriptors, including the registering of any servlets that you add to your project.

  • Generates and maintains an Ant script with targets (commands) for compiling, cleaning, testing, WAR file creation, and deployment to a server. This script saves you from having to move files manually to the web server.

  • Ensures that the configuration files that appear in the WEB-INF folder of your application are not deleted when you run the Clean command to remove results of previous builds.

  • Provides syntax highlighting; code completion; and other aids for editing servlet, JSP, HTML, and tag library files.

  • Provides the Compile JSP command, which enables you to detect syntax errors in JSP files before deploying to your server, whether the errors occur at compile time or during the translation of the JSP file into a servlet.

  • Provides comprehensive debugging support, which includes stepping into JSP files and tracking HTTP requests.

This chapter focuses on issues specific to web applicationscreating and editing web components, debugging HTTP transactions, and so onbut does not include information on project creation or the IDE's support for the JavaServer Faces (JSF) and Struts web frameworks. See Chapter 3 for information on creating projects. See Chapter 9 for information on using the IDE's support for web frameworks.

Most of the topics in this chapter assume that you are using the Tomcat web server, but it is also possible to use the Sun Java System Application Server, which supports full Java EE applications and includes full support for web services. The IDE also makes it possible to connect with other application servers, such as JBoss and BEA WebLogic. Most of the tasks detailed here that involve the Tomcat server are very similar to the equivalent tasks you would perform if deploying to an application server. See Chapter 13 for more information on working with the Sun Java System Application Server and Chapter 12 for information on developing, exposing, and consuming web services.



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