在 Eclipse 中导入动态 Web 项目?

发布于 2024-12-09 18:41:58 字数 1893 浏览 0 评论 0原文

我使用 eclipse 3.6.2[Helios] 和 tomcat 7 和 myfaces 1.2.10

当我想导入动态 Web 项目时遇到问题。我在工作区中导入项目并执行配置并设置 jar 文件,但是当我在 tomcat 中运行该项目时,我会遇到此问题

HTTP Status 404 -

type Status report

message

description The requested resource () is not available.
Apache Tomcat/6.0.33

并在控制台中显示此错误:

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Eclipse\Workspaces\Wsp2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Wp1 does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4320)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Oct 13, 2011 4:12:18 AM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()

我应该做什么?

谢谢

i use eclipse 3.6.2[Helios] and tomcat 7 and myfaces 1.2.10

i have a problem when i want to import a dynamic web project . i import the project in my workspace and perform the configurations and set jar files but when i run that in tomcat i will have this problem

HTTP Status 404 -

type Status report

message

description The requested resource () is not available.
Apache Tomcat/6.0.33

and in console display this error :

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Eclipse\Workspaces\Wsp2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Wp1 does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4320)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Oct 13, 2011 4:12:18 AM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()

what should i do ?

thanx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一百个冬季 2024-12-16 18:41:58

Eclipse和Tomcat都陷入了混乱。我建议清理并重建所有。

  1. 从 Tomcat 中删除项目(右键单击 Tomcat,添加/删除项目,删除项目)
  2. 在 Eclipse 中关闭项目(右键单击项目,关闭
  3. 清理 Tomcat(右键单击 Tomcat,清理
  4. 在 Eclipse 中重新打开项目(右键单击项目,打开
  5. 在 Eclipse 中清理项目(项目 > 清理... > 清理下面选定的项目,选择项目)
  6. 添加项目到Tomcat (右键单击 Tomcat,添加/删除项目,添加项目)
  7. 启动 Tomcat(右键单击 Tomcat,启动)。

Eclipse and Tomcat are both in confusion. I'd suggest to clean and rebuild all.

  1. Remove project from Tomcat (rightclick Tomcat, Add/Remove project, remove project)
  2. Close project in Eclipse (rightclick project, Close)
  3. Clean Tomcat (rightclick Tomcat, Clean)
  4. Reopen project in Eclipse (rightclick project, Open)
  5. Clean project in Eclipse (Project > Clean... > Clean selected projects below, select project)
  6. Add project to Tomcat (rightclick Tomcat, Add/Remove projects, add project)
  7. Start Tomcat (rightclick Tomcat, Start).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文