【问题标题】:Configured jetty server in mule esb在 mule esb 中配置的码头服务器
【发布时间】:2015-01-06 19:20:31
【问题描述】:

我想在 mule esb 中配置嵌入式码头服务器。

我尝试了很多东西,但都没有成功。请告诉我如何配置。

我想创建一个 webinf 文件夹,我可以在其中托管 servlet 文件和 jsp 文件。我看过在线书籍示例,但它在我的 mulestudio 中不起作用。

我收到文件夹结构错误。我也尝试过搜索,但没有得到任何工作示例。

【问题讨论】:

    标签: mule mule-el mule-component mule-module-jpa


    【解决方案1】:

    mule-config.xml 中添加以下内容:-

     <?xml version="1.0" encoding="UTF-8"?>
        <mule xmlns="http://www.mulesoft.org/schema/mule/core"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:jetty="http://www.mulesoft.org/schema/mule/jetty"
              xsi:schemaLocation="
                http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
                http://www.mulesoft.org/schema/mule/jetty http://www.mulesoft.org/schema/mule/jetty/current/mule-jetty.xsd">
    
            <jetty:connector name="jettyConnector">
                <jetty:webapps directory="${app.home}/webapps" port="8083"/>
            </jetty:connector>
    
        </mule>
    

    在您的项目的 src/main/app 文件夹中创建一个 webapps 文件夹,其中您的 WEB-INF 和 HTML/JSP 文件与您在其他服务器中的相同

    【讨论】:

      【解决方案2】:

      添加一个完整的 SSL 示例。自从提出问题以来已经有一段时间了,但我希望这会对某人有所帮助。

      <?xml version="1.0" encoding="UTF-8"?>
      <mule xmlns="http://www.mulesoft.org/schema/mule/core" 
          xmlns:jetty="http://www.mulesoft.org/schema/mule/jetty" 
          xmlns:jetty-ssl="http://www.mulesoft.org/schema/mule/jetty-ssl" 
          xmlns:context="http://www.springframework.org/schema/context"
          xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
          xmlns:spring="http://www.springframework.org/schema/beans" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
          http://www.mulesoft.org/schema/mule/jetty-ssl http://www.mulesoft.org/schema/mule/jetty-ssl/current/mule-jetty-ssl.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
          http://www.mulesoft.org/schema/mule/jetty http://www.mulesoft.org/schema/mule/jetty/current/mule-jetty.xsd
          http://www.mulesoft.org/schema/mule/jetty-ssl http://www.mulesoft.org/schema/mule/jetty/current/mule-jetty-ssl.xsd">
      
          <context:property-placeholder location="${mule.env}.properties" />
      
          <jetty-ssl:connector name="jettySslConnector" doc:name="Jetty">
              <jetty-ssl:tls-key-store   
                  path="${ssl.keystore.path}" 
                  keyAlias="${ssl.keystore.alias}" 
                  storePassword="${ssl.keystore.keypassword}" 
                  keyPassword="${ssl.keystore.keypassword}" 
                  type="jks" />
              <jetty-ssl:webapps 
                  directory="${app.home}/webapps" 
                  port="${https.port}" />
          </jetty-ssl:connector>
      
      </mule>
      

      【讨论】:

        猜你喜欢
        • 2019-03-15
        • 1970-01-01
        • 2015-02-04
        • 1970-01-01
        • 1970-01-01
        • 2015-02-13
        • 2016-10-09
        • 1970-01-01
        • 2014-07-16
        相关资源
        最近更新 更多