The warning about the source property
is new with Tomcat 6.0.16 and may be
ignored. WTP adds a "source" attribute
to identify which project in the
workspace is associated with the
context. The fact that the Context
object in Tomcat has no corresponding
source property doesn't cause any
problems.
I realize that this doesn't answer how to get rid of the warning, but I hope it helps.
The solution to this problem is very simple. Double click on your tomcat server. It will open the server configuration. Under server options check ‘Publish module contents to separate XML files’ checkbox. Restart your server. This time your page will come without any issues.
I'm finding that Tomcat can't seem to find classes defined in other projects, maybe even in the main project. It's failing on the filter definition which is the first definition in web.xml. If I add the project and its dependencies to the server's launch configuration then I just move on to a new error, all of which seems to point to it not setting up the project properly.
Our setup is quite complex. We have multiple components as projects in Eclipse with separate output projects. We have a separate webapp directory which contains the static HTML and images, as well as our WEB-INF.
Eclipse is "Europa Winter release". Tomcat is 6.0.18. I tried version 2.4 and 2.5 of the "Dynamic Web Module" facet.
I copied the dynamic Webproject before the issue came up. So, changing the org.eclipse.wst.common.component file in the .settings directory solved the issue for me. The other solutions did not work.
The separate XML solution never worked for me and other's recently ...
I usually follow this process and something helps:
Stop the server (Make sure its stopped via Task Manager, I killed javaw.exe as many times Eclipse doesn't really shut down properly)
Right click the Server->'Add and Remove'. Remove the project. Finish.
Right click the Server->'Add and Remove'. Add the project. Finish.
Restart see if works, if not continue
Double click the Server... See where its getting published (Server Path: which I think goes to a tmp# directory for me since I use an already-installed Tomcat instance I re-use, not sure if would be different if use Eclipse's internal/bundled tomcat server)
Right click on Server and 'Clean' ... Last one worked for me last time (so may want to try this first), Adding/Removing project worked for me other times. If doesn't work, continue ...
Delete all files from the Server Path and see if all files actually get built and published there (/WEB-INF/classes and other regular files in / webroot).
Restart Eclipse and/or machine (not sure I ever needed to get to this point)
I am posting my answer because I suspect there might be someone out there for whom the above solutions might not have worked.
So, you are getting a warning,
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server: (project name)' did not find a matching property.
Rather than disabling this warning by checking that option in Server configuration (I did try that) I would suggest you do this:
First close all the existing projects by right clicking in Project explorer.
Remove all the projects already synchronized with the server.
Remove the server and redeploy it.
Create a new dynamic project, do nothing yet just try running this on the server.
Check the console, do you get the warning now. (My case I didn't get any).
This means that something is wrong with your project not with eclipse or the server.
Now restart the server. Don't run any app yet.
You probably know that the Tomcat container loads up context of all the synchronized apps at the start.
It will load context of any already synchronized app.
Here is the catch, if there is really something wrong in your project it will show the stack trace of the exceptions.Look carefully and you will find where is the bug in your app.
Now if you successfully found that there is a bug in your app, the probable place would be look for a web.xml file which the container uses for loading the app. In my case I had misspelled a name in servlet mapping which made me debug meaninglessly for 3 hours. Your problem might be someplace else.
And another thing, if you have many apps synchronized with the server,there is a possibility some other app's context might be the source of problem. Try debugging one by one.
But what I came to know after reading all these, we haven't observed that on which folder the struts.xml file or any configuration file which is necessary for the web application.
My SOULUTION IS:
copy the struts.xml file to the src folder of our project.
click "file-->save all" in eclipse and go click "project-->clean".