【问题标题】:Openfire not run on eclipse Error "503 accessing /setup/index.jsp."Openfire 无法在 Eclipse 上运行 错误“503 访问 /setup/index.jsp”。
【发布时间】:2017-01-02 16:58:17
【问题描述】:

我能够在我的电脑的本地主机上成功运行 openfire 程序。

但是如果我在eclipse上运行openfire的源代码

我收到错误 “HTTP 错误:503 访问 /index.jsp 时出现问题。原因: 服务不可用”

在控制台eclipse中运行源代码后的输出是: “Openfire 3.9.3 [2016 年 8 月 26 日上午 8:42:49] 管理控制台在 http://my-localhost:9090"

监听

我在这里想念什么? 感谢您的帮助。

我发现我的 build.xml 文件有问题

之后,运行 AS > Ant Build

新的错误是:" 构建失败 C:\Android\Root_workspace\V7\openfire\build\build.xml:511:执行此行时出现以下错误: C:\Android\Root_workspace\V7\openfire\build\build.xml:519: C:\Android\Root_workspace\V7\openfire\src\web 不存在。”

网络路径有问题。

我的Build.xml部分代码是:

  <!-- jspc ================================================================================== -->
<target name="jspc" depends="compile" description="Compiles all JSP pages in the admin console">
    <mkdir dir="${jspc.dest.dir}"/>
    <mkdir dir="${jspc.java.dest.dir}"/>
    <mkdir dir="${jspc.classes.dest.dir}"/>
    <mkdir dir="${webapp.dest.dir}"/>

    <antcall target="-jspc-impl"/>
</target>

<target name="-jspc-impl" unless="no.jspc">

    <!-- we're forced to create a temp dir to properly overwrite sources from overlay directory -->
    <mkdir dir="${jspc.jsp.src.dir}"/>

    <copy todir="${jspc.jsp.src.dir}">
        <fileset dir="${web.dir}"/>
    </copy>
    <!-- copy overlay -->

【问题讨论】:

    标签: java eclipse jsp openfire


    【解决方案1】:

    您应该单独运行服务器,而不是直接从 Eclipse 运行 Openfire。正如我在这个答案中所描述的: Openfire development in Eclipse

    一旦您对源代码进行了更改,只需使用 Ant 编译它并从 target/ 目录重新运行服务器。

    【讨论】:

    • 我没有得到如何“使用 Ant 构建服务器,它将在 target/ 文件夹中生成整个服务器。”有链接吗?
    • 在 Eclipse 中,浏览源代码并在 build/ 文件夹下找到“build.xml”文件。右键单击构建文件并运行方式> Ant Build 然后检查控制台是否构建成功。为了成功构建,它将在 target/ 文件夹下生成 Openfire 服务器二进制文件
    • 可以让Openfire从Eclipse启动,只是设置环境比较麻烦,时间长,需要修改ant编译。
    猜你喜欢
    • 2013-09-03
    • 2021-11-29
    • 2019-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多