Not able to setup apache tomcat in Netbeans 9
Asked Answered
O

3

5

I am trying to setup apache tomcat in Netbeans IDE 9. I have tried following steps, but could not setup.

  1. In the Tools->Servers, I clicked on the Add server button. Following message displayed.

No Server Plugins are installed in the IDE

  1. So, I tried to install plugins from the Tools->Plugins, a dialog box is displayed but when I try to update plugins list it is not able to connect. In effect NB IDE tries to connect to non-existant page.

  2. So, I am effectively not able to succeed in installing Apache Tomcat server. I am also using NB 8.2 and everything works fine. Any Help will be appreciated.

  3. I am using Windows 10 Prof with JDK 10.

Thanks in anticipation.

Onanism answered 12/8, 2018 at 8:31 Comment(0)
O
16

You are hitting this problem because of a larger and more general issue: NetBeans 9 does not officially support Java EE or web application development. For example, as well as not being able to add a Tomcat server, you will notice that you can't create a web project through the Project Wizard either.

There is a reason for this: NetBeans has been migrated from Oracle to Apache and the initial focus has been on providing a stable Java SE environment, including support for JDK releases 9 and 10 in NetBeans 9.

However, it is possible to add the plugins needed for web and Java EE development to NetBeans 9 at your own risk:

Step 1 of 2: Make the Java Web and EE plugins available.

  • Tools > Plugins > Settings tab > click the Add button.
  • On the Update Center Customizer screen:

  • This should create a new entry in the Configuration of Update Centers list in the Settings tab.
  • Checking that new entry should instantly add plugins to the Available Plugins tab.
  • Click the Available Plugins tab, then click the Category column to sort the entries by category.
  • Verify that there are now several entries with the category Java Web and EE. If so, you have successfully made the plugins available:

    addJavaWebAndEe

Step 2 of 2: Install the Java Web and EE plugins.

  • Check all of the Java Web and EE entries as shown in the screen shot above, and then click the Install button.
  • Follow the wizard's instructions. The plugins will be downloaded and installed, and you will be required to restart NetBeans.
  • Following the restart, right-click the Servers node. You should now see the Add Server Instance wizard, allowing you to add the Tomcat server:

    addServer

Oestrone answered 13/8, 2018 at 0:51 Comment(6)
Very nice ! I like !Embalm
FYI, this does not work anymore in netbeans 15 - any way of using Jakarta web development?Gobetween
@Gobetween Noted. It doesn't work any more because NetBeans has changed their approach to installing some plugins. But I am successfully running Apache TomEE 8.0.12 with JDK 17.0.2 on NetBeans 15, so it's not as though Apache won't work on NetBeans 15 at all. However, there is an issue with installing recent versions of Jakarta EE and Tomcat. See my answer to the question TomEE 8 Server being limited to Java EE7 Web apps in Netbeans 15.Oestrone
@Gobetween As noted in my answer, the problem with using recent versions of Jakarta EE is due to a NetBeans bug #4027. See No Java EE 8 Web Server option for TomEE 8.0.11 and TomEE 9.0.0 M7Oestrone
@Oestrone Thank you - found it. My workaround was to use Netbeans 14 to create a web project and then continue working with Netbeans 15 on the same.Gobetween
@Gobetween That's an inventive workaround. If you post your own answer I'll be happy to upvote it.Oestrone
S
4

For NetBeans 10 the NetBeans 8.2 Plugins URL is already configured, just need to activate it in the Plugin Manager/Settings then check the Java EE plugins described in a previous response.

Stonyhearted answered 1/2, 2019 at 18:36 Comment(1)
Note that "Java EE Base" pulls in 86 self-signed plugins. :) I personally think we could just drop most of EE outside of the core supported by Tomcat, but hey it's not up to me. :)Gooding
A
1

Some times it is cause of proxy setting in your IDE

In NetBeans IDE :

1- tools/Option set proxy setting -> No Proxy

2- services/servers right click on tomcat and refresh or restart

Algin answered 28/7, 2019 at 9:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.