【问题标题】:URL is changed to http://localhost:8080/WEB-INF after importing project from Eclipse to NetBeans将项目从 Eclipse 导入 NetBeans 后,URL 更改为 http://localhost:8080/WEB-INF
【发布时间】:2013-05-02 18:33:14
【问题描述】:

我的 JSF2.0 网页最初是基于 Eclipse Indigo 设计的。一段时间后,我意识到 NetBeans 对 Web 开发来说更强大,因为它可以同时突出显示 xhtml 页面以及所有 xhtml 验证。所以最后我将项目导入到 NetBeans 7.3。一切顺利,但是当我在这里运行它时,我注意到 URL 更改为 http://localhost:8080/WEB-INF

我需要在哪里提及 URL?我在 Glassfish v3.1.2 中运行我的网站

【问题讨论】:

    标签: jsf-2 primefaces


    【解决方案1】:

    您可能需要调整上下文根。

    在此处查看 netbeans kb 文章project-setup-existing-sources

    10.(Optional) Adjust the context path. By default, the context path is based on the project name.
    

    同时检查 glassfish-web.xml

    例如,hello1 应用程序的 glassfish-web.xml 文件指定以下上下文根:

    <context-root>/hello1</context-root>
    

    另见:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-26
      • 1970-01-01
      • 1970-01-01
      • 2016-06-07
      • 2018-08-24
      • 1970-01-01
      相关资源
      最近更新 更多