“设置属性规则” 从 Eclipse 启动 Tomcat 时出现警告消息
当我从 Eclipse (3.4) 启动 Tomcat (6.0.18) 时,我收到以下消息(日志中的第一个消息):
警告: [SetPropertiesRule]{服务器/服务/引擎/主机/上下文} 将属性“源”设置为 'org.eclipse.jst.jee.server:(项目名称)' 未找到匹配的属性。
看起来这个消息没有产生任何严重的影响,但是,有人知道如何摆脱它吗?
When I start Tomcat (6.0.18) from Eclipse (3.4), I receive this message (first in the log):
WARNING:
[SetPropertiesRule]{Server/Service/Engine/Host/Context}
Setting property 'source' to
'org.eclipse.jst.jee.server: (project name)'
did not find a matching property.
Seems this message does not have any severe impact, however, does anyone know how to get rid of it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
单独的 XML 解决方案对我和其他人来说从来没有工作过......
我通常遵循这个过程,并且有一些帮助:
The separate XML solution never worked for me and other's recently ...
I usually follow this process and something helps:
我在 Eclipse 3.4(Ganymede) 和动态 Web 项目中遇到了同样的问题。
该消息并不影响成功部署。但我必须
从 Eclipse 的 .settings 文件夹中的 org.eclipse.wst.common.component 文件中删除行
I had the same problem with Eclipse 3.4(Ganymede) and dynamic web project.
The message didn't influence successfull deploy.But I had to delete row
from org.eclipse.wst.common.component file in .settings folder of Eclipse
我在问题出现之前复制了动态Web项目。 因此,更改 .settings 目录中的 org.eclipse.wst.common.component 文件解决了我的问题。 其他解决方案不起作用。
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.
服务器选项卡
--> 双击服务器名称
--> 服务器选项:勾选“将模块上下文发布到单独的 XML 文件”
重新启动服务器
Servers tab
--> doubleclick servername
--> Server Options: tick "Publish module contexts to separate XML files"
restart your server
从 Eclipse 中删除服务器实例并创建一个新实例。
Delete the server instance from Eclipse and create a new one.
这个问题的解决方法非常简单。 双击您的 tomcat 服务器。 它将打开服务器配置。 在服务器选项下,选中“将模块内容发布到单独的 XML 文件”复选框。 重新启动您的服务器。 这次您的页面将不会出现任何问题。
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.
来自 Eclipse 新闻组:
我意识到这并不能回答如何消除警告,但我希望它有帮助。
From Eclipse Newsgroup:
I realize that this doesn't answer how to get rid of the warning, but I hope it helps.
我正在使用 Eclipse。 我已通过以下方法解决了此问题:
您不会收到任何此类错误。
I am using Eclipse. I have resolved this problem by the following:
You will not get any this kind of error.
我尊重这里给出的所有解决方案。
但阅读完所有这些内容后我发现,我们没有观察到 struts.xml 文件或 Web 应用程序所需的任何配置文件位于哪个文件夹中。
我的解决方案是:
希望问题得到解决。
I respect all the solutions given here.
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:
Hope the problem solved.
我发布我的答案是因为我怀疑可能有人上述解决方案可能不起作用。
所以,你收到警告,
我建议您不要通过检查服务器配置中的该选项来禁用此警告(我确实尝试过):
这意味着您的项目出了问题,而不是 Eclipse 或服务器出了问题。
您可能知道 Tomcat 容器在开始时加载所有同步应用程序的上下文。
现在,如果您成功发现应用程序中存在错误,则可能的位置是查找容器用于加载应用程序的 web.xml 文件。 就我而言,我在 servlet 映射中拼错了一个名称,这让我毫无意义地调试了 3 个小时。 你的问题可能出在其他地方。
另一件事,如果您有许多应用程序与服务器同步,则其他应用程序的上下文可能是问题的根源。 尝试一一调试。
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,
Rather than disabling this warning by checking that option in Server configuration (I did try that) I would suggest you do this:
This means that something is wrong with your project not with eclipse or the server.
You probably know that the Tomcat container loads up context of all the synchronized apps at the start.
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.
确保 web.xml 文件中的 jsp 文件名正确。 通过用我当前的文件名替换 web.xml 中的默认 .jsp 文件名解决了问题
Make sure you have correct jsp file name in web.xml file. By replacing default .jsp filename in web.xml with my current filename solved the problem
我发现 Tomcat 似乎无法找到其他项目中定义的类,甚至可能在主项目中也找不到。 它在过滤器定义上失败,这是 web.xml 中的第一个定义。 如果我将项目及其依赖项添加到服务器的启动配置中,那么我只会出现一个新错误,所有这些似乎都表明它没有正确设置项目。
我们的设置相当复杂。 我们在 Eclipse 中有多个组件作为项目,并具有单独的输出项目。 我们有一个单独的 webapp 目录,其中包含静态 HTML 和图像,以及我们的 WEB-INF。
Eclipse 是“Europa 冬季版本”。 Tomcat 是 6.0.18。 我尝试了“动态 Web 模块”方面的 2.4 和 2.5 版本。
谢谢你的帮助!
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.
Thanks for any help!