Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Module name is invalid" when exporting an existing eclipse project to a war file

Tags:

I am trying to export an existing Eclipse project to a war file. But whatever I typed in the "WAR Export" dialog page, the system always returned "Module name is invalid". I do not know how to fix this issue. Thanks for the help.

like image 468
bit-question Avatar asked May 25 '11 19:05

bit-question


People also ask

How do I export a WAR file as a project?

Procedure. Right-click on a Web project folder and select Export from the pop-up menu. Then select WAR file in the Export window and then select Next. Specify the Web project you want to export (this field is primed if you used the pop-up menu to open the wizard), and specify a location for the new WAR file.

Can we import WAR file in Eclipse?

Select File > Import . In the Import dialog, select WAR file and then click Next. Locate the WAR file that you want to import using the Browse button. The wizard assumes you want to create a new Web project with the same name as the WAR file.


2 Answers

I had the same issue, and I fixed it. Please follow the steps below, and you can create your war file.

  1. Right-click on folder project.
  2. Click on properties.
  3. Go to project facets.
  4. Activate, if necessary.
  5. Scroll down to Configuration and mark Dynamic Web Module.

This works for me.

like image 122
Aneurysmo Avatar answered Sep 22 '22 14:09

Aneurysmo


you must be sure your project is a Web Project, if it's not a Web Project check this link: http://eclipse.dzone.com/tips/converting-java-project-dynami

like image 20
Lucas Avatar answered Sep 25 '22 14:09

Lucas