adrianboimvaser
adrianboimvaser

Reputation: 2641

In NetBeans, how do I convert a "Java Application" Project to a "Web Application" Project?

In NetBeans, how do I convert a "Java Application" Project to a "Web Application" Project?

Upvotes: 1

Views: 7421

Answers (4)

Nuno Rafael Figueiredo
Nuno Rafael Figueiredo

Reputation: 2166

Try delete the NetBeans Project configuration files and create a Web Application with existing sources.

Upvotes: 0

Samuel
Samuel

Reputation: 2520

If it is Maven project, try adding this line to your POM file:

<packaging>war</packaging>

I've just added it and it changed from java app (red coffee icon) to web app (blue globe icon; if that is what you mean) automatically.

Upvotes: 6

Dimitry Sherman
Dimitry Sherman

Reputation: 33

I had the same problem coming up; Try this utility:

erichauser.net/2009/10/26/ant2maven-easy-migration-from-ant-to-maven-with-nexus

Upvotes: 1

Karthik Ramachandran
Karthik Ramachandran

Reputation: 12175

As far as i know there is no direct convert option.

In the past what I've done is either added the "Java Applicaton" as a dependency in a new web application or created a new web application and moved the code over.

Upvotes: 2

Related Questions