How to deploy to Tomcat from NetBeans?

前端 未结 9 990
渐次进展
渐次进展 2021-02-08 14:51

I\'ve added Tomcat in the \"Tools > Servers\" menu and as you can see it appears in the list of servers:

But when I try to run my project, I cannot select Tomcat! The dr

9条回答
  •  粉色の甜心
    2021-02-08 15:34

    When you create a Maven based web app project, you specify the spec version of the project as you create it.

    image of the Maven web App Wizard with default values http://www.freeimagehosting.net/uploads/20d7e476a5.png

    If you want to create a project that you can deploy with Tomcat, you need to change the value of the 'Java EE Version' field from 'Java EE 6' to 'Java EE 5', before you hit the Finish button.

    Note: I had hoped that there was a simple change that could be applied to your projects pom file to convert it from Java EE 6 to Java EE 5... but it turns out that it is not so easy...

提交回复
热议问题