Why no option to import a WAR file into Eclipse?

2019-06-21 11:38发布

I have a WAR file for a Java project but when I try to import it into Eclipse, the only option is for archive files such as tar, zip, jar - nothing for war.

Is this only an option in certain editions of Eclipse because I have a copy of SpringSource (also Eclipse-base) that allows me to import WAR files?

Would it be possible to add this option to my current version without downloading a new edition of Eclipse?

alt text

4条回答
爷、活的狠高调
2楼-- · 2019-06-21 12:07

Just install the Eclipse Web Dev tools from the Marketplace over the Eclipse for Java developers. No need to install IDE for Java EE developers.

查看更多
可以哭但决不认输i
3楼-- · 2019-06-21 12:09

If u still using Eclipse IDE for Java Developers so there is a alternate solution for it, it is not a good solution for developer but it work.

1.Unzip the war file.

2.than create a project in eclipse.

3.Than copy the contain of unzip folder one by one & paste in proper position in your project.like servlet paste in src & jsp pages place in war folder.

4.care fully read this point an unzip folder there is a web-inf folder & also in your project there is web-inf folder. So copy the contain of web-inf folder carefully in project web-inf folder.

This solution perfectly work.

查看更多
Emotional °昔
4楼-- · 2019-06-21 12:26

Your version of Eclipse is Eclipse IDE for Java Developers. Try download Eclipse IDE for Java EE developers

Your version of Eclipse doesn't have the Web tree pane.

查看更多
淡お忘
5楼-- · 2019-06-21 12:26

What version of eclipse do you have? I have 3.4 and 3.5 installed currently and both have this following path to import a war file.

Go to File->Import->Web->War.

查看更多
登录 后发表回答