"Error finding WebContent folder" - Eclipse - Create a new Vaadin theme


When attempting to create a new vaadin theme in association with an existing vaadin project, i get the error -

“Error finding WebContent folder” and it won’t let me create the theme.

I’ve traced the source for this wizard such that I can see the source of the exception (from com.vaadin.integration.eclipse.ProjectUtil)

public static IFolder getWebContentFolder(IProject project)
130	            throws CoreException {
131	        IVirtualComponent component = ComponentCore.createComponent(project);
132	        if (component == null) {
133	            throw ErrorUtil
134	                    .newCoreException("Unable to locate WebContent folder. Ensure the project is a dynamic web project.");
135	        }
136	        IVirtualFolder contentFolder = component.getRootFolder();
137	        IContainer underlying = contentFolder.getUnderlyingFolder();
138	        if (!(underlying instanceof IFolder)) {
139	            throw ErrorUtil
140	                    .newCoreException("Unable to locate WebContent folder. Ensure the project is a dynamic web project.");
141	        }
142	        return (IFolder) underlying;
143	    }

I’ve checked the facets associated with the project and it is a dynamic web, vaadin enabled project. I’m using Eclipse Indigo. Any ideas as to what may be happening here? Under what circumstances do either createComponent / getUnderlyingFolder fail?

Kind regards,


In order to resolve this I ended up having to re-create the project and configuring all of the project facets accordingly. Not sure what caused this in the first place but there does seem to be an issue with the vaadin / eclipse integration.

I am also having this problem. Trying to use the recompile widget set button in Eclipse Indigo and get an error message statign : Unable to locate Web Content Folder. Ensure the project is a dynamic web project".


Just fixed the problem I was having related to this error message. I created the project from a maven archetype for the mobile touchkit, which does not create a Dynamic Web Project. To enable your project as a dynamic web project:
1. Right click the project.
2. Click Properties
3. Select “Project Facets”
4. Select the check boxes “DYnamic Web Module” and “Vaadin Plug-in for Eclipse”.

Now you should be able to successfully recompile the widget set. Hope this helps someone! :slight_smile:

Thanks so much Clay!

In case anyone else has this, I broke it by trying to remove some files from git submission and removed .settings/org.eclipse.wst.common.component. I managed to restore it from source control, and then it worked.

I had the same issue. Make sure the
Context root
is “/” for your project. Eclipse: Project-> Properties-> Web project Settings .