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 drop-down with servers is empty. I tried it with NetBeans 6.8 and 6.9 Beta. Any idea?
The end: I've used the wrong archetype so that NetBeans decided that Tomcat is not capable to execute it.
After you download and extract Tomcat follow these steps: Tools -> Plugins -> Available plugins, search for 'tomcat' and install the one named "Java EE Base plugin". Restart Netbeans. On the project view (default left side of the screen), go to services, right click on Servers and then "Add Server"
Deploy the ProjectOpen your project in the Deployment Editor. Ensure that the application server is running. In the toolbar of the Deployment Profile Editor, click Deploy.
Add Tomcat Server to NetBeans Open your NetBeans. Under Service tab, right click server and click Add Server. A pop up dialog should open. In the dialog, select Apache Tomcat as the server that will be added.
I had the same problem and solved it ;
It was because the Java EE version was higher than the tomcat version requires.
What to do :
Click the files tab near projects tab. Under nbproject folder , select j2ee.platform , if you use Tomcat7 than change the platform to 1.6 for example(Tomcat6 > Jave EE 1.5). than make a "clean and build" on the project .
Now the server will come at Project > properties > Run > Servers
If you right-click the project, select Properties and go to Run, there should be a dropdown list of servers. Is that one empty as well?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With