@WebServlet fails in Netbeans 11.0 with java.lang.RuntimeException: com.example.NewServlet.(NewServlet.java:1)

前端 未结 2 1747
悲&欢浪女
悲&欢浪女 2020-11-28 16:04

Some kind of nightmare - can not launch primitive servlet on Apache Tomcat 9.0.22 (or Glassfish 5.0.1) and Apache NetBeans IDE 11.0 (Build incubator-netbeans-release-404-on-

相关标签:
2条回答
  • 2020-11-28 16:40

    The fault was in Apache NetBeans 11. In later version (still unofficial) 11.1 the Servlet annotations works as it should be, even without web.xml file. Tested with Apache Tomcat 9.0.22 and Glassfish 5.0.1 on Apache NetBeans IDE 11.1 (available for download from this web page).

    0 讨论(0)
  • 2020-11-28 16:51

    I encountered this problem in Netbeans 12.0 today using OpenJDK 14. It turns out the problem was resolved by installing the nb-javac plugin.

    0 讨论(0)
提交回复
热议问题