Cov txheej txheem:

HTTP kev sib tham ua haujlwm li cas?
HTTP kev sib tham ua haujlwm li cas?

Video: HTTP kev sib tham ua haujlwm li cas?

Video: HTTP kev sib tham ua haujlwm li cas?
Video: 05/19/2023 AOC Rooj kev sib tham nyob teb chaws Nplog | AOC Conference in Vientiane, Laos 05/16/2023 2024, Kaum ib hlis
Anonim

Nov yog nws ua haujlwm li cas:

  1. Server qhib a kev sib tham (sets lub ncuav qab zib ntawm HTTP header)
  2. Server set a kev sib tham sib txawv.
  3. Client hloov nplooj.
  4. Client xa tag nrho cov ncuav qab zib, nrog rau cov kev sib tham ID los ntawm kauj ruam 1.
  5. Server nyeem kev sib tham ID los ntawm ncuav qab zib.
  6. Server sib tw kev sib tham ID los ntawm ib daim ntawv teev npe hauv database (lossis nco thiab lwm yam).

Hauv qhov no, HTTP kev sib tham yog dab tsi?

HTTP ntu yog tus qauv kev lag luam uas tso cai rau Web servers tswj tus neeg siv tus kheej thiab khaws cov ntaub ntawv tshwj xeeb rau cov neeg siv thaum muaj ntau qhov kev thov / teb kev cuam tshuam ntawm tus neeg siv khoom thiab daim ntawv thov Web.

Ib yam li ntawd, kev sib kho yog dab tsi thiab vim li cas peb siv nws? Kev sib tham yog ib txoj hauv kev yooj yim khaws cov ntaub ntawv rau ib tus neeg siv tawm tsam ib qho tshwj xeeb kev sib tham ID. Qhov no tuaj yeem yog siv kom txuas ntxiv lub xeev cov ntaub ntawv ntawm nplooj ntawv thov. Kev sib tham IDs feem ntau raug xa mus rau qhov browser ntawm kev sib tham ncuav qab zib thiab tus ID yog siv mus retrieve uas twb muaj lawm kev sib tham cov ntaub ntawv.

Ib yam li ib tug yuav nug, HTTP kev sib tham ua haujlwm li cas hauv Java?

HttpSession khoom siv los khaws tag nrho kev sib tham nrog tus neeg siv khoom tshwj xeeb.

Servlet: HttpSession yog dab tsi?

  1. Ntawm tus neeg thov thawj zaug, Web Container tsim ib qho kev sib tham tshwj xeeb ID thiab muab nws rov qab rau tus neeg siv khoom nrog cov lus teb.
  2. Tus neeg siv yuav xa rov qab qhov kev sib tham ID nrog txhua qhov kev thov.

Kev sib kho thiab ncuav qab zib ua haujlwm li cas?

ncuav qab zib raug xa los ntawm tus browser mus rau lub server thaum qhov kev thov HTTP pib, thiab lawv raug xa rov qab los ntawm lub server, uas tuaj yeem hloov kho lawv cov ntsiab lus. ncuav qab zib yog qhov tseem ceeb siv los khaws a kev sib tham id. yav dhau los ncuav qab zib tau siv los khaws ntau hom ntaub ntawv, vim tsis muaj lwm txoj hauv kev.

Pom zoo: