There are different ways to profile your application.
With the help of IDE integration: use the "Profile" action from within your IDE, like you do "Run" or "Debug".
J2EE server integration wizard
Automatically enable profiling in a number of popular application servers, generating appropriate startup scripts.
If the J2EE server runs locally (i.e. on the same machine where you run the profiler UI)
Tools | Integrate with J2EE Server...
If the J2EE server runs on a remote machine
If none of the above approaches apply, perform a few simple steps described in Enabling profiling manually for your application server.
Also see J2EE high-level profiling