???????????????? ?? WWW ? HTTP - PowerPoint PPT Presentation

About This Presentation
Title:

???????????????? ?? WWW ? HTTP

Description:

Title: Java Web Applications Course - WWW and HTTP Author: Svetlin Nakov Last modified by: Svetlin Nakov Created Date: 11/24/2003 11:05:59 PM Document presentation format – PowerPoint PPT presentation

Number of Views:180
Avg rating:3.0/5.0
Slides: 27
Provided by: Svetli8
Learn more at: https://www.devbg.org
Category:
Tags: http | www | apache | tomcat

less

Transcript and Presenter's Notes

Title: ???????????????? ?? WWW ? HTTP


1
???????????????? ?? WWW ? HTTP
??????? ?????
?????????? ???????? ?? ?????????? ?? ???????
academy.devbg.org
2
??????????
  1. ????? ? WWW?
  2. ?????????? ?? WWW URL, HTML, HTTP
  3. ?????????? HTTP
  4. HTTP ??????
  5. HTTP ????????
  6. Cookies

3
????? ? WWW?
??????????? ?? World Wide Web
4
????? ? WWW?
  • WWW World Wide Web Web ???
  • ???????? ????????????? ???????????? ? ????????
  • ?????? ? ???????? (???? E-mail, DNS, ...)
  • ????????? ????????? (? ????? ???????) ???????????
    ?? ???????? ??? ???????
  • ???????? ???? ?????????? ????????? ???? HTTP,
    HTTPS ? FTP ?? ?????? URL
  • ??? ????????? ??????????? ??? ??????????
  • ??? ?????????? ???????? ??? ????????

5
?????????? ?? WWW
  • ?????????? ??????????
  • Internet ?????????? ?????? ?? ????? ??
    ??????????? TCP ? HTTP
  • ??????? (??? ????????) ???????? ???
    ???????????? Internet Explorer, Mozilla,
  • ??? ??????? Apache, IIS, Tomcat
  • ?????????? ??????????
  • Hyper Text Transfer Protocol (HTTP)
  • Hyper Text Markup Language (HTML)
  • Uniform Resource Locator (URL)
  • Uniform Resource Identifiers (URIs)

6
?????????????? ?? WWW
  • ????????? ????????? ??? ??????? ?? ?? ?????
    ??????? ?? ??? ????????? ?? HTTP
  • ????????? ???? ???????? URL ?????
  • ????????? ?????? ????????? ??????
  • ??? ?????? ??? ? ????????? ?? ??????
  • ??? ?????????? ?? ??????? ??? WWW
  • ??????? ?? ?? HTML ?????, ???????, ????????, ????
    ? ????? ??????? (???????)
  • ??? ???????
  • ??? ????????? ?? ??????????? ?? ??? ????????

7
?????????????? ?? WWW (2)
  • ?????????? ??????? ??????? (render) ???
    ??????????, ??????? ?? ??? ???????
  • ?????????? ?? ???????? ?? ????? HTML (Hyper Text
    Markup Language)
  • ?????????? ???????? ?????, ??????? ? ????
  • HTML ?????????? ????? ?? ???????? ?????-?????? ??
    ????????? ??? ????? ????????
  • ?????? ??????? ?? WWW ?????? ????? ??????????
    ??????? ?????????
  • TCP/IP, DNS, HTTP,
  • ?????????? HTTP ? ????????????? ?? WWW

8
??????? ?????????? ?? WWW URL
  • Uniform Resource Locator (URL)
  • ????? ?? ???????? ?????? ??? WWW, ????.
  • ???????????? ?????????? ???
  • ???????? ?? ?????? ?? ??????? (http, ftp, https,
    ...)
  • ??? ?? ??????? ??? IP ????? (????????
    academy.devbg.org)
  • ??? ?? ??????? ? ??? (????., index.php)
  • ????????? (????. ?id27langen)

http//academy.devbg.org/index.php
9
??????? ?????????? ?? WWW HTML
  • Hyper Text Markup Language (HTML)
  • ?????????? ????? ? ???????? ? ???????????
  • ???????????? ?? ? ?? ??????? ?? ??????????
  • ????? ?? ????????? ? ??????????
  • HTML ??????????? ?? ?????? ????? ? ??????
  • ????? ?? ?????? ??????????? ?? ??????
  • ???????? ?? ??????????? ? HTML ?????????
  • ??? ????????
  • HTML ????, ????????? ???????? ? ????? ???????
    (?????????? ?? ???????)

10
HTML ??????
lthtmlgt ltheadgtlttitlegtExample HTMLlt/titlegtlt/headgt
ltbodygt lth1gtHeading 1lt/h1gt lth2gtSub
heading 2lt/h2gt lth3gtSub heading 3lt/h3gt
ltpgtThis is my first paragraphlt/pgt ltpgtThis is
my second paragraphlt/pgt lta href"http//academ
y.devbg.org"gtltimg src"NASD-logo.png"
border"0"gtlt/agt ltdiv align"center"
style"backgroundskyblue"gt This is a
divlt/divgt lt/bodygt lt/htmlgt
11
HTML ??????
lthtmlgt ltheadgtlttitlegtExample HTMLlt/titlegtlt/headgt
ltbodygt lth1gtHeading 1lt/h1gt lth2gtSub
heading 2lt/h2gt lth3gtSub heading 3lt/h3gt
ltpgtThis is my first paragraphlt/pgt ltpgtThis is
my second paragraphlt/pgt lta href"http//academ
y.devbg.org"gtltimg src"NASD-logo.png"
border"0"gtlt/agt ltdiv align"center"
style"backgroundskyblue"gt This is a
divlt/divgt lt/bodygt lt/htmlgt
12
??????? ?????????? ?? WWW HTTP
  • Hyper Text Transfer Protocol (HTTP)
  • ???????? ?? ?????? ?? ??? ??????? ????? ???
    ?????? ? ??? ??????
  • ????? ???????? ?? HTTP
  • ????? ?????? ???????
  • ???????? ?????????? ???? URL
  • ?? ???????? ????????? (stateless)
  • ?????? ??????? ? ????????? ?? ???
  • ??????? ??????

13
?????????? HTTP
??? HTTP ???????
14
HTTP ?????? ? ????????
  • ????????? ??????????
  • ???????? ??? ???????
  • ???? ??????
  • ??????? ??????
  • ???????? ??????????
  • ??? ??????
  • ????? ??????? ??????
  • ?????????? ??????

GET /index.html
"Welcome to our Web site!"
15
?????? Hyper Text Transfer Protocol
HTTP ??????
GET /courses/archive/spring06/cos461/
HTTP/1.1 Host www.cs.princeton.edu User-Agent
Mozilla/4.03 ltCRLFgt
???????? ??? ??????? ???? ?? ?????? ?? ????????
HTTP ???????
HTTP/1.1 200 OK Date Mon, 6 Feb 2006 130903
GMT Server Netscape-Enterprise/3.5.1 Last-Modifie
d Mon, 6 Feb 2006 111223 GMT2 Content-Length
54 ltCRLFgt lthtmlgtlttitlegtHellolt/titlegt Welcome to
our sitelt/htmlgt
???????? ??? ??????? ???? ?? ?????? ?? ????????
16
HTTP ??????
  • HTTP ???????? ?? ??????? ?? ?????? ??
  • ??? ?? ???????? (request line)
  • ????? ?? ???????? (GET, POST, HEAD, PUT, ...),
    ?????? ? ?????? ?? HTTP ?????????
  • ?????? ?? ????????
  • ?????????? ???????? ????????? ? ?????????
  • ????
  • ??????? ?????, ???? ?? ? ??????

ltrequest methodgt ltresourcegt HTTP/ltversiongt ltheader
sgt ltempty linegt ltbodygt
17
HTTP GET ?????? ??????
?????? ?? HTTP GET ??????
GET /InetJava-2002-program.html HTTP/1.1 Host
inetjava.sourceforge.net Accept
/ Accept-Language bg Accept-Encoding gzip,
deflate User-Agent Mozilla/4.0(compatibleMSIE
6.0 Windows NT 5.0) Connection
Keep-Alive Cache-Control no-cache ltCRLFgt
18
HTTP POST ?????? ??????
?????? ?? HTTP POST ??????
POST /webmail/login.phtml HTTP/1.1 Host
www.abv.bg Accept / Accept-Language
bg Accept-Encoding gzip, deflate User-Agent
Mozilla/4.0(compatibleMSIE 6.0 Windows NT
5.0) Connection Keep-Alive Cache-Control
no-cache Content-Length 59 ltCRLFgt LOGIN_USERbori
s DOMAIN_NAMEabv.bg LOGIN_PASStajnamajna ltCRLFgt
19
HTTP ??????? GET ?????? ??????
?????? ?? HTTP ??????? GET ??????
GET /courses/archive/spring06/cos461/
HTTP/1.1 Host www.cs.princeton.edu User-Agent
Mozilla/4.03 If-Modified-Since Mon, 6 Feb 2006
111223 GMT ltCRLFgt
  • ????? ??????? ???? ??? ? ??? ??????????? ??
    ???????
  • ????????? ?? ??????? (???? ????????)
  • ???????? ????? ??????? 304 Not Modified ???
    ???????? ?? ? ????????
  • ??? 200 OK ? ?????????? ?????? ?? ???????

20
HTTP ???????
  • ????????? ?? ???????? ?? ?????? ??
  • ?????? ??? ?????? ?? HTTP ?????????, ??????
    ???, ??????????? ?????
  • ?????? ?? ???????? ??????????? ?????????
  • ???? ?????????? ?? ???????? (????????? ??????)

HTTP/ltversiongt ltstatus codegt ltstatus
textgt ltheadersgt ltempty linegt ltresponse body -
requested resourcegt
21
HTTP ??????? ??????
?????? ?? HTTP ??????? ?? ???????
HTTP/1.1 200 OK Date Sat, 10 Aug 2002 160918
GMT Server Apache/1.3.9 (Win32) Accept-Ranges
bytes Content-Length 73 Content-Type
text/html lthtmlgt ltheadgt lttitlegt Test lt/titlegt
lt/headgt Test HTML page. lt/htmlgt
  • ??? ???????? ????? ????????? ?????? ?????? ?
    ????????? ?? ????

22
HTTP ??????? ??????
?????? ?? HTTP ??????? ? ??? ?? ??????
HTTP/1.1 404 Not Found Date Sat, 10 Aug 2002
162017 GMT Server Apache/1.3.9
(Win32) Connection close Content-Type
text/html ltHTMLgtltHEADgt ltTITLEgt404 Not
Foundlt/TITLEgt lt/HEADgtltBODYgt ltH1gtNot
Foundlt/H1gt The requested URL /img/nakov.gif was
not found on this server.ltPgt ltHRgtltADDRESSgtApache/1
.3.9 Server at test Port 80lt/ADDRESSgt lt/BODYgtlt/HTM
Lgt
23
?????? ?? HTTP ????????
  • ??-????? ?????? ?? HTTP ????????
  • GET ????? ?????? ?? ???????, ??????????
    ????????? ???????? ??? ?????? (??? ?????????
    ??????????)
  • HEAD ????? ??????????? ?? ????? ?????? (????
    ???????? ?? ????????)
  • POST ???????? ??????, ??????? ????? ?? ?????????
    ??? ???????? ??? ?????? ?? ???????

24
HTTP ?????? ?? ????????
  • ??????? ?????? ?? HTTP ????????
  • 1xx ?????????? (????., 100 Continue)
  • 2xx ????? (????., 200 OK)
  • 3xx ???????????? (????., 304 Not Modified,
    "302 Found")
  • 4xx ?????? ??? ??????? (????., 404 Not Found)
  • 5xx ?????? ?? ??????? (????., 503 Service
    Unavailable)
  • "302 Found" ?? ???????? ?? ????????????
    (redirect) ?? ??? ???????? ??? ???? URL

25
Cookies
  • Cookie (????)
  • ????? ???? ????? ????????? ?? ??????? ? ?????????
    ??????? ? ??? ????????
  • ???????? ?? ? ?????? ?? ?????? ?????? ??? ?????
    ??? ??????

??????
??????? Set-Cookie XYZ
???????? ?????? Cookie XYZ
26
???????????????? ?? WWW ? HTTP
  • ????????
Write a Comment
User Comments (0)
About PowerShow.com