五月综合激情婷婷六月,日韩欧美国产一区不卡,他扒开我内裤强吻我下面视频 ,无套内射无矿码免费看黄,天天躁,日日躁,狠狠躁

新聞動(dòng)態(tài)

Tomcat的Server Options選項(xiàng)詳解

發(fā)布日期:2022-03-27 18:34 | 文章來(lái)源:CSDN

一、配置

默認(rèn)前兩個(gè)是沒有勾選的,應(yīng)該勾選上:

在默認(rèn)情況下,當(dāng)項(xiàng)目部署到tomcat中,該插件會(huì)把項(xiàng)目文件拷貝到上一個(gè)配置項(xiàng)Server Locations中的顯示Server pathwtpwebapps目錄下,即當(dāng)前wrokspace所在目錄下的。metadata子目錄中,如我的wrokspaceD:\workspace,那么該目錄是:D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps。

但如果選中上面的這個(gè)選項(xiàng),則不會(huì)把項(xiàng)目文件發(fā)布到該目錄下運(yùn)行,而是:

web資源目錄是:web項(xiàng)目的WebContent,即maven web項(xiàng)目的src/main/webapp目錄

class文件目錄是:是當(dāng)前配置的class文件的輸出目錄,即maven項(xiàng)目的target/classes目錄

2Timeouts

默認(rèn)情況下start45秒,stop15秒,這里可能需要修改一下start為一個(gè)合適大的值,它的意思是當(dāng)啟動(dòng)時(shí)間超過(guò)這里指定的時(shí)間還沒有啟動(dòng)完成時(shí),就報(bào)錯(cuò)。當(dāng)我們的項(xiàng)目啟動(dòng)很耗時(shí)的情況下,這顯然不是我們想要的,所以需要修改一下這個(gè)值。

勾選上Server Options->Serve Modules without publishing,不勾的話,修改類文件里就會(huì)不停的重啟Web服務(wù)器;如果Web項(xiàng)目啟動(dòng)時(shí)間比較長(zhǎng)的話,還需要修改超時(shí)時(shí)間,這個(gè)在Timeouts里面設(shè)置

在Cotext節(jié)點(diǎn)中有一個(gè)reloadable='true'屬性,將它改為false,可以在修改java文件后不用重啟服務(wù)器即可生效,但是不包括新建java文件、添加方法和變量的操作

二、瀏覽文件

Context節(jié)點(diǎn)單獨(dú)生成的文件:

原來(lái)Tomcat安裝目錄下conf/server.xml中的Context節(jié)點(diǎn)(勾選第二個(gè)選項(xiàng)之后,server.xml中就不存在這個(gè)節(jié)點(diǎn)了):

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
  <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log" suffix=".txt"/>
  <Context docBase="D:\workspace\workspace(eclipse)\Shop\WebConte

三、原因

1.勾選第一個(gè)是為了防止出現(xiàn)警告:

警告: A docBase D:/Tomcat/webapps/Shop inside the host appBase has been specified, and will be ignored

勾選后表示讓tomcat直接使用eclipse中的WebContent下的東西
省去publish到<workspace>.metadata.pluginsorg.eclipse.wst.server.coretmp0webapps
并將tmp0webapps下相關(guān)的resources刪除,
同時(shí)會(huì)修改<workspace>.metadata.pluginsorg.eclipse.wst.server.coreservers.xml中的serveModulesWithoutPublish=true以及tmp0/conf/server.xml中的<Context>配置

2.勾選第二個(gè)是為了防止出現(xiàn)警告:

警 告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:strut2demo' did not find a matching property.

[SetPropertiesRule]警告的原因是Tomcat6.0以上的server.xml的context節(jié)點(diǎn)中不再支持source屬性了。具體說(shuō)明如下:

For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.

優(yōu)化

找到菜單,Window->Preferences

檢查英文的拼寫沒什么用處,這里把拼寫檢查取消,位置:General->Editors->Text Editors->Spelling,把Enable spell checking 取消勾選

還有一處的檢查也可以取消 位置:Validation,勾選Suspend all validators

顯示行號(hào) 位置:General->Editors->Text Editors,勾選Show line numbers

jsp頁(yè)面的默認(rèn)編碼方式改為utf-8 位置:Web->JSP Files,Encoding改為ISO 10646/Unicode(UTF-8)

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持本站。

版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。

相關(guān)文章

實(shí)時(shí)開通

自選配置、實(shí)時(shí)開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問(wèn)服務(wù)

1對(duì)1客戶咨詢顧問(wèn)

在線
客服

在線客服:7*24小時(shí)在線

客服
熱線

400-630-3752
7*24小時(shí)客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部