Not able to setup apache tomcat in Netbeans 9

杀马特。学长 韩版系。学妹 提交于 2019-12-03 08:39:41

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:

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:

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!