Search code examples
netbeanswebserverprofiler

How can I change the Web server that the NetBeans profiler uses?


NetBeans 8.2 profiler uses the web-server that comes with the IDE: Tomcat 8.0.27.0. I added the Tomcat of another version that interests me to IDE, but i did not find a way to switch to it. If i remove the old server from the IDE, the profiler still tries to work by default. How can I switch the profiler to another web-server?


Solution

  • You don't associate the server to be used with the Profiler; you associate the server to be used with the web application you want to profile. To do that:

    Step 1 of 3: Create the server:

    • Create the server that you want to use (i.e. Tomcat, Glassfish, Payara etc.) in NetBeans.
    • Verify that you can Start and Stop it from under the Servers entry in the Services panel.

    Step 2 of 3: Associate your web project with that server:

    • Select your web project in the Projects panel.
    • Right click and select Properties.
    • Select Run from the list of Categories.
    • Select the server you want to use from the Server drop list. In this case I chose to use Glassfish 4.1.1:

    ChooseServer

    Step 3 of 3: Profile your web application:

    • Select your web project in the Projects panel.
    • Right click and select Profile.
    • Click the Profile button. Immediately you will see that the server you just selected for running your web application (Glassfish 4.1.1 in my case) is being used.

    ProfileUsingServer

    This is a good nine minute introductory video on using the Profiler on NetBeans 8.1+ which may be helpful.