Profiling a Web Application
See Also
There are two ways to profile a web application project:
- As a stand-alone web application project
- As part of an enterprise application
If your web application is part of an enterprise application, you should always
profile it by running the profile command on the enterprise application project.
Since the IDE does not know which enterprise applications a web application project
belongs to, running the Profile command on a web application project deploys it
as a stand-alone application.
If you are deploying your web application or enterprise application to a local installation
of the Glassfish application server, you can profile your project by
choosing Profile Main Project from the main menu or choosing Profile from the pop-up menu in the
Projects window.
If you are deploying your web application or enterprise application to a remote server,
you need to attach the IDE to the remote server and profile the application in Attach mode.
The Attach Wizard can help you configure the remote server to accept attachment.
To profile a stand-alone web application:
- In the Projects window, right-click the web application project and choose Profile.
- Select a profiling task and click Run.
When you profile a stand-alone web application project, the IDE does the following:
- Compiles the web application if necessary.
- Stops the application server and starts it in profile mode.
- Deploys the web application to the application server.
- Starts a profiling session, attaches the profiler to the server, and opens the Profiler window in the IDE.
After the application is deployed to the server, you should invoke its code the same way as you would for debugging or
just evaluating application functionality.
You can view the profiling data once the code of the application is invoked.
To profile an enterprise application:
- In the Projects window, right-click the enterprise application project and choose Profile.
- Select a profiling task and click Run.
When you profile an enterprise application, the IDE does the following:
- Compiles the EAR file if necessary.
- Stops the application server and starts it in profile mode.
- Deploys the enterprise application to the application server.
- Starts a profiling session, attaches the profiler to the server, and opens
the Profiler window in the IDE. If the application has
a designated web application and URL to run, the IDE opens the URL in the
external browser.
- See Also
- Profiling Tasks: Quick Reference
- Setting Profiling Filters
- Profiling a Remote Application
- Profiling Windows
- Selecting a Profiling Task
Legal Notices