【问题标题】:Deployment directory missing at Tomcat 7 by running from Eclipse IDE [duplicate]通过从 Eclipse IDE 运行,Tomcat 7 中缺少部署目录 [重复]
【发布时间】:2020-02-23 13:21:29
【问题描述】:

当我从Eclipse IDE 运行JSF Web 应用程序时,我找不到目录(myjsfapp)。我知道该应用程序将部署在<tomcat home>/webapps 目录中。 这就是为什么,我从我的程序中打印出real-path,如下所示。

Object context = FacesContext.getCurrentInstance().getExternalContext().getContext();
String systemPath = ((ServletContext) context).getRealPath("/");
System.out.println(systemPath);

真实路径是

<my-workspace>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\myjsfapp\

为什么myjsfapp 不部署在&lt;tomcat home&gt;/webapps?我该怎么做才能部署到那个目录

【问题讨论】:

    标签: java eclipse jsf tomcat7


    【解决方案1】:

    我有一个解决方案,将 vm 参数的路径更改为 Eclipse 的 Edit lunch configuration properties

    -Dwtp.deploy="D:\dev\eclipse\hwak-framework\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps"
    

    我还收到了另一个reference

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-23
      • 2015-04-21
      • 1970-01-01
      • 2012-03-28
      • 2023-03-21
      • 1970-01-01
      • 2014-12-02
      • 1970-01-01
      相关资源
      最近更新 更多