第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

在碼頭部署靜態(tài)內(nèi)容

在碼頭部署靜態(tài)內(nèi)容

手掌心 2022-07-06 18:39:59
我正在嘗試在碼頭中部署靜態(tài)應(yīng)用程序,但使用 xml 配置文件,因?yàn)槲沂褂玫氖翘摂M主機(jī)。我為部署創(chuàng)建了這個(gè)文件 xml:<?xml version="1.0"  encoding="ISO-8859-1"?><!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"   "http://www.eclipse.org/jetty/configure.dtd"><Configure class="org.eclipse.jetty.webapp.WebAppContext">    <Set name="contextPath">/mail</Set>    <!--<Call name="setInitParameter">        <Arg>org.eclipse.jetty.servlet.Default.useFileMappedBuffer</Arg>        <Arg>false</Arg>    </Call> -->    <Set name="handler">    <New class="org.eclipse.jetty.server.handler.ResourceHandler">      <Set name="resourceBase">/ccmail</Set>      <Set name="directoriesListed">true</Set>    </New>  </Set>    <Set name="virtualHosts">    <Array type="java.lang.String">      <Item>apps.cairunet.ad.br</Item>         </Array>  </Set> </Configure>我的文件夾應(yīng)用程序的名稱(chēng)是ccmail. 位于webapps/ccmail 我已經(jīng)嘗試傳遞到路徑:<Set name="resourceBase">/ccmail</Set><Set name="resourceBase">ccmail</Set><Set name="resourceBase">./ccmail</Set><Set name="resourceBase">webapps/ccmail</Set><Set name="resourceBase">/webapps/ccmail</Set>任何這條路徑都不適合我的人。碼頭啟動(dòng)此錯(cuò)誤:2019-02-25 09:36:46.422:WARN:oejs.ServletContextHandler:main: 不應(yīng)直接調(diào)用 ServletContextHandler.setHandler。使用 insertHandler 或 setSessionHandler 等 2019-02-25 09:36:46.484:WARN:oejw.WebInfConfiguration:main: Can't generate resourceBase 作為 webapp tmp dir name: java.lang.IllegalStateException: No resourceBase or war set for上下文 2019-02-25 09:36:46.500:WARN:oejw.WebAppContext:main: 上下文 oejwWebAppContext@7d0587f1{/mail,nul 啟動(dòng)失敗
查看完整描述

1 回答

?
慕村225694

TA貢獻(xiàn)1880條經(jīng)驗(yàn) 獲得超4個(gè)贊

注意:請(qǐng)注意您的 DOCTYPE,您聲明的內(nèi)容來(lái)自 Jetty 7.x 到 Jetty 8.x,不適用于 Jetty 9.x


不要混用 ResourceHandler 和 WebAppContext / ServletContextHandler。


<?xml version="1.0"  encoding="ISO-8859-1"?>

<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"

   "http://www.eclipse.org/jetty/configure_9_3.dtd">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">

  <Set name="contextPath">/mail</Set>

  <Set name="virtualHosts">

    <Array type="java.lang.String">

      <Item>apps.cairunet.ad.br</Item>     

    </Array>

  </Set> 

</Configure>

最基本的支持是不要/ccmail在你的<Configure>.


它存在的事實(shí)${jetty.base}/webapps/ccmail/就足夠了,它將/ccmail為您部署為靜態(tài)資源庫(kù)。


但是,如果您想將靜態(tài)資源與虛擬主機(jī)結(jié)合起來(lái),那么您可以使用帶有備用基礎(chǔ)的 WebAppContext 或新的 ResourceHandler。

ResourceHandler 使用示例: https ://www.eclipse.org/jetty/documentation/current/static-content-deployment.html


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"

   "http://www.eclipse.org/jetty/configure_9_3.dtd">

<Configure class="org.eclipse.jetty.server.handler.ContextHandler">

  <Set name="contextPath">/ccmail</Set>

  <Set name="handler">

    <New class="org.eclipse.jetty.server.handler.ResourceHandler">

      <Set name="resourceBase">/fully/qualified/path/to/my/jetty.base/webapps/ccmail</Set>

      <Set name="directoriesListed">true</Set>

    </New>

  </Set>

  <Set name="virtualHosts">

    <Array type="java.lang.String">

      <Item>apps.cairunet.ad.br</Item>     

    </Array>

  </Set> 

</Configure>


查看完整回答
反對(duì) 回復(fù) 2022-07-06
  • 1 回答
  • 0 關(guān)注
  • 149 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)