Cov txheej txheem:

Kuv yuav xa cov ntaub ntawv WAR li cas hauv Windows Server?
Kuv yuav xa cov ntaub ntawv WAR li cas hauv Windows Server?

Video: Kuv yuav xa cov ntaub ntawv WAR li cas hauv Windows Server?

Video: Kuv yuav xa cov ntaub ntawv WAR li cas hauv Windows Server?
Video: UA LI CAS THIAJ TSI MUAJ MENYUAM 2024, Kaum ib hlis
Anonim

Yuav ua li cas xa cov ntaub ntawv WAR rau Apache Tomcat (Windows)

  1. Koj yuav tsum tau tsim lub vev xaib yooj yim ua ntej los ntawm kev tsim cov npe thiab ib qho yooj yim JSP (Java Server Nplooj).
  2. Qhib cov lus txib kom sai thiab mus rau c:/DemoWebsite.
  3. Luam the WAR file koj nyuam qhuav tsim rau CATALINA_HOME/webapps, xws li c:/Tomcat8/webapps.
  4. Pib lub Tomcat server .

Ib yam li ntawd, nws tau nug, Kuv yuav xa cov ntaub ntawv ua tsov rog hauv tomcat 9 li cas?

Muab tso rau

  1. Xa ib Daim Ntawv Qhia lossis WAR los ntawm URL. Nruab ib lub web application directory lossis ". war" file nyob rau ntawm Tomcat server.
  2. Deploy a Directory or War from the Host appBase. Nruab ib lub web application directory los yog ". war" cov ntaub ntawv nyob rau hauv koj lub Host appBase directory.
  3. Deploy using a Context configuration ". xml" file.

Kuj Paub, Kuv yuav ua li cas thiaj paub yog tias tsov rog raug xa tawm hauv Tomcat? Txoj kev meej rau txiav txim yog tias a tsov rog ua tiav xa mus thiab lub webapp tau pib yog saib hauv catalina. tawm log. Cov lus yuav raug kaw. Hauv kev ua haujlwm, Tomcat yuav teb rau qhov kev thov ua rau lub webapp ntau txoj hauv kev nyob ntawm seb nws nyob deb npaum li cas.

Kuj paub, kuv yuav muab cov ntaub ntawv ua tsov rog nyob qhov twg hauv tomcat?

Phau ntawv cov kauj ruam - Windows

  1. Luam cov ntaub ntawv.war (piv txwv li: prj.war) rau %CATALINA_HOME%webapps (E.g.: C: omcatwebapps)
  2. Khiav %CATALINA_HOME%instartup.bat.
  3. Koj cov ntaub ntawv.war yuav raug muab rho tawm mus rau ib lub nplaub tshev uas muaj tib lub npe (tsis muaj txuas ntxiv) (piv txwv li: prj)
  4. Mus rau %CATALINA_HOME%confserver.

Dab tsi yog tsov rog hauv tomcat?

WAR . Java web applications feem ntau yog ntim raws li WAR cov ntaub ntawv rau kev xa tawm. Cov no cov ntaub ntawv tuaj yeem tsim rau ntawm kab hais kom ua lossis nrog IDE zoo li dab noj hnub. Tom qab siv peb lub hlis WAR file , Tomcat unpacks nws thiab khaws txhua qhov project cov ntaub ntawv nyob rau hauv webapps directory nyob rau hauv ib tug tshiab directory npe tom qab qhov project.

Pom zoo: