Importing war file into eclipse and build path problem

I am facing some weird problem when importing .war file into eclipse.

The problem is, the build folder does not contain any necessary class folder. So when I try to set the build path, eclipse reports "Error while adding to build path. Reason: cannot nest output folder 'projectName/build/class' inside 'projectName/build'. From what I understand, 'build' folder is what classes get collected(as build version) right?

I tried to ignore build path and just export .war file into tomcat server, but somehow servlet file keeps showing old code, which I changed in eclipse. So, I am thinking without proper build folder, exported .war will not contain modified servlect code.( I am sorry if this doesn't sound clear)

What can I do to fix this problem? I already tried to create a whole new workspace and restarted eclipse several times and it didn't solve the problem.


I figured it out. It was mistake to interpret build folder as what I described in the question. Build folder cannot be nested.

Need Your Help

Eclipse no longer can auto import java Classes

java eclipse ide

A few days ago my eclipse stopped being able to auto import classes. So usually when I have a class I'm using, like BufferedReader, that I need to import I simply hit ctrl+shift+O and the imports

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.