In Netbeans 6.9, how to change Application Server
In Netbeans 6.9.1, i've created a web application wiht Glassfish 开发者_如何学GoServer 3.
(Undert the server textbox, java ee version defautls to "Java EE 6 Web"). Now I've installed an Apache tomcat 7 (actually it sees it as 6 because the 7 version was not provided in Netbeans 6.9.1). The problem is that i'm no more allowed to choose Tomcat, it doesn't appear in the server combobox of the project properties. If I do a web app from scratch, i can. I tried to: -remove WEB-INF/sun-config.xml -close and reopen the project
- Rightclick on the project's name > 'properties' > 'run'
- And try to change 'Server'
If you created a Java EE 6 project, the IDE will not let you try to deploy it onto a server that does not support Java EE 6. NetBeans 6.9.1 does not distinguish between Tomcat 6 (which does Servlet 2.5) and Tomcat 7 (which supports Servlet 3.0). NetBeans 7.0 does know that Tomcat 7.0 can be used to deploy web apps that originally targeted GlassFish 3.0 or 3.1...
So the best solution for your situation is to install NetBeans 7.0.
Change Application Server in Netbeans IDE
- Right click on the project that you want to change server.
- click on properties
- click on run
- select server drop down.
- then click ok.
精彩评论