Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy to Tomcat from NetBeans?

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.

like image 944
deamon Avatar asked May 06 '10 12:05

deamon


People also ask

How does tomcat integrate with NetBeans?

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"

How do I deploy a project in NetBeans?

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.

Does NetBeans support Apache Tomcat?

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.


2 Answers

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

like image 188
K0zk Avatar answered Oct 17 '22 02:10

K0zk


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?

like image 20
Stian Avatar answered Oct 17 '22 03:10

Stian