1

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

1
  • Is it a Maven build or an Ant build? Commented Jan 27, 2011 at 19:38

4 Answers 4

6

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.

Sign up to request clarification or add additional context in comments.

Comments

2

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.

Comments

1

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

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

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.