銆岀81鏈熴€? 鏋舵瀯鍒嗘瀽 -Tomcat 璇锋眰娴佺▼

Posted IparhanGeek

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了銆岀81鏈熴€? 鏋舵瀯鍒嗘瀽 -Tomcat 璇锋眰娴佺▼相关的知识,希望对你有一定的参考价值。




鍚潃闊充箰 馃幍 琛ュ厖鐭ヨ瘑



Tomcat

Apache Tomcat 

  WEB鏈嶅姟鍣?nbsp;      Tomcat


    apache -- web鏈嶅姟鍣?涔熸槸璺烡ocker涓€鏍风殑瀹瑰櫒,璇村埌杩欎釜鐪熸槸鎯劎,鐢ㄤ簡4-5骞翠簡,涓嶈繃涔熸病鏈変竴娆″ソ濂界殑鎬荤粨涓€涓嬪拰鐮旂┒涓€涓嬪簳灞?鍙槸鍖嗗繖鐨勫幓浣跨敤浜?鑷粠寮€濮嬪線搴曞眰鐮旂┒寮€濮嬪彂鐜?tomcat鐪熺殑鏄竴涓濂囩殑涓滆タ,杩欓噷浼氬瓨鎵嶅嚑涓棶棰樿寮勬竻妤氾細

        1.apache tomcat 鍒板簳鏄€庝箞鎺ュ彈鐨勮姹?http/s)?

        2.鎺ュ彈璇锋眰鍚庢€庝箞鍙堟妸璇锋眰杞彂缁橨ava 搴旂敤鏈嶅姟鍣?servlet/Spring)

涓婅堪鐨勮繖涓や釜闂寰堝鍋欽ava鐨勫紑鍙戝伐绋嬪笀浠湭蹇呴兘閭d箞鐔熸倝(灏界浣犳槸4-5骞寸殑)鎵€浠ユ垜鎯冲湪杩欓噷鍋氫竴娆″洖椤俱€?/span>


Apache Tomcat 浠嬬粛鍜屽墫鏋?/span>


棣栧厛鐪嬩竴涓婣pache tomcat 鐨勫熀鏈灦鏋勶細

銆岀81鏈熴€? 鏋舵瀯鍒嗘瀽 -Tomcat 璇锋眰娴佺▼


瑙i噴锛?/span>

    

  • /bin - Startup, shutdown, and other scripts. The *.sh files (for Unix systems) are functional duplicates of the *.bat files (for Windows systems). Since the Win32 command-line lacks certain functionality, there are some additional files in here.

  • /conf - Configuration files and related DTDs. The most important file in here is server.xml. It is the main configuration file for the container.

  • /logs - Log files are here by default.

  • /webapps - This is where your webapps go.



璇戞枃锛?/span>

    /bin -- 灏辨槸涓€涓猼omcat鐨勫姞杞藉櫒,璐熻矗鍚姩鍜岄攢姣佷换鍔°€?/span>

    /conf -- 閰嶇疆鏂囦欢

    /logs --  鏃ュ織鏂囦欢

    /webapps -- 瀛樻斁html闈欐€佹枃浠?/span>



Apache tomcat 鏋舵瀯缁撴瀯鍥?HTTP/S 璁块棶)


涓嬮潰鏄疉pache tomcat鐨勬灦鏋勫浘鍙堟槸澶勭悊HTTP/S璇锋眰鐨勫鐞嗘祦绋嬪浘锛?/span>


鍏跺疄灏辨槸鍚勮嚜鍒嗗伐寰堟槑纭?閮芥槸浠庡鍒板唴鐨勬楠?杩欓噷灏变笉绮樿创server.xml 閰嶇疆鏂囦欢浜?浠g爜閲忚繃澶?閲岄潰鐨勪唬鐮佸師鐞嗕篃鏄窡杩欎釜鍥剧殑鍘熺悊鍜屾祦绋嬫槸涓€鏍风殑锛?/span>

浠庡垵绾у埌鏋舵瀯甯?/span>锛?/span>

        1.鍒濈骇Java宸ョ▼甯?nbsp; -- 鐭ラ亾浠€涔堟槸Tomcat鎬庝箞涓嬭浇鍜岄厤缃€庝箞鍘讳娇鐢ㄣ€?br>

        2.涓骇Java寮€鍙戝伐绋嬪笀 -- 鍦ㄥ疄闄呭紑鍙戜腑鎬庝箞鍚堢悊鐨勪娇鐢ㄥ拰浼樺寲,瀹為檯缁忛獙銆?br>

        3.楂樼骇Java宸ョ▼甯?-- 瑕佺煡閬揟omcat 鐨勮璁℃€濈淮鍜屾簮鐮?HTTP/S璇锋眰鐨勫鐞嗚繃绋嬨€?br>

        4.Java 鏋舵瀯甯?-- 鏍规嵁浠ュ線鐨勭粡楠屼紭鍖栧湪tomcat鐨勫熀纭€涓婅璁″嚭姣攖omcat鏇翠紭绉€鐨剋eb鏈嶅姟鍣ㄥ苟涓旂粰鑷繁鐨勯」鐩幓鐢?杩欓噷鏋舵瀯甯堝叧浜巘omcat瑕佺煡閬撶殑鐭ヨ瘑澶浜?姣斿OSI灞傜殑HTTP/S 锛孴CP寮€鍏?DNS鍩熷悕瑙f瀽,tomcat璐熻浇鍧囪 ,闄愭祦,鍒嗗竷寮?澶氱嚎绋?瀹夊叏))銆?/span>



Tomcat 澶勭悊HTTP/S 璇锋眰鐨勭悊璁?/p>


1銆佺敤鎴风偣鍑荤綉椤靛唴瀹癸紝璇锋眰琚彂閫佸埌鏈満绔彛8080锛岃鍦ㄩ偅閲岀洃鍚殑Coyote HTTP/1.1 Connector鑾峰緱銆?nbsp;
2銆丆onnector鎶婅璇锋眰浜ょ粰瀹冩墍鍦ㄧ殑Service鐨凟ngine鏉ュ鐞嗭紝骞剁瓑寰匛ngine鐨勫洖搴斻€?nbsp;
3銆丒ngine鑾峰緱璇锋眰localhost/test/index.jsp锛屽尮閰嶆墍鏈夌殑铏氭嫙涓绘満Host銆?nbsp;
4銆丒ngine鍖归厤鍒板悕涓簂ocalhost鐨凥ost锛堝嵆浣垮尮閰嶄笉鍒颁篃鎶婅姹備氦缁欒Host澶勭悊锛屽洜涓鸿Host琚畾涔変负璇ngine鐨勯粯璁や富鏈猴級锛屽悕涓簂ocalhost鐨凥ost鑾峰緱璇锋眰/test/index.jsp锛屽尮閰嶅畠鎵€鎷ユ湁鐨勬墍鏈夌殑Context銆侶ost鍖归厤鍒拌矾寰勪负/test鐨凜ontext锛堝鏋滃尮閰嶄笉鍒板氨鎶婅璇锋眰浜ょ粰璺緞鍚嶄负鈥?鈥濈殑Context鍘诲鐞嗭級銆?nbsp;
5銆乸ath=鈥?test鈥濈殑Context鑾峰緱璇锋眰/index.jsp锛屽湪瀹冪殑mapping table涓鎵惧嚭瀵瑰簲鐨凷ervlet銆侰ontext鍖归厤鍒癠RL PATTERN涓?.jsp鐨凷ervlet,瀵瑰簲浜嶫spServlet绫汇€?nbsp;
6銆佹瀯閫燞ttpServletRequest瀵硅薄鍜孒ttpServletResponse瀵硅薄锛屼綔涓哄弬鏁拌皟鐢↗spServlet鐨刣oGet锛堬級鎴杁oPost锛堬級.鎵ц涓氬姟閫昏緫銆佹暟鎹瓨鍌ㄧ瓑绋嬪簭銆?nbsp;
7銆丆ontext鎶婃墽琛屽畬涔嬪悗鐨凥ttpServletResponse瀵硅薄杩斿洖缁橦ost銆?nbsp;
8銆丠ost鎶奌ttpServletResponse瀵硅薄杩斿洖缁橢ngine銆?nbsp;
9銆丒ngine鎶奌ttpServletResponse瀵硅薄杩斿洖Connector銆?nbsp;
10銆丆onnector鎶奌ttpServletResponse瀵硅薄杩斿洖缁欏鎴稡rowser銆?/span>


END




以上是关于銆岀81鏈熴€? 鏋舵瀯鍒嗘瀽 -Tomcat 璇锋眰娴佺▼的主要内容,如果未能解决你的问题,请参考以下文章

瀹夋帓锛岃胺绮掑晢鍩巎ava鍒嗗竷寮忓紑鍙戝熀纭€绡囬珮绾х瘒涓庨珮鍙敤闆嗙兢鏋舵瀯绡?020

redis鏋舵瀯

鏁版嵁鍒嗘瀽濡備綍鍔╁姏淇濋櫓琛屼笟瀹炵幇鐪熸鐨勨€滄寜闇€鈥濇湇鍔★紵

鑲℃潈鏋舵瀯璁捐鐨勭洰鐨勫拰鍘熷垯

P9 澶т浆鍘熷垱鈥斺€斿洓涓楠わ紝杞绘澗鎼炲畾鏋舵瀯璁捐

瓒h皥Hbase鏋舵瀯