КонстрПЗ_ПI_ЛР2014_ч2
.pdf51
> |
<td>w-/X3[и1 2</td> <!-- P 62 -- |
||||||
</tr> <!-- Q9 6 / 8 A 9 --> |
|
||||||
<tr> |
<!-- 8 A 9 6 ? 9 --> |
|
|||||
2 --> |
<td>a.QPи0 .6S/1</td> |
<!--R 8 A 9 |
6- |
||||
<td>I eG -+1/T S.QPи0 .6S/1</td> <!-- |
|||||||
|
|||||||
R 8 A 9 B --> |
|
|
|
||||
</tr> |
<!--Q9 6 / 8 A 9--> |
|
|||||
</table> |
<!--S C @9 6 / 8 A 9--> |
|
|||||
</p> |
<!--; = 6 / 8 A 9--> |
|
|||||
<p> |
|
<!--8 A 9 6 ? 2 ; =--> |
|||||
<form action="some_doc.html" method=post> <!-- |
|||||||
O 6 9 |
=. |
: 2 |
C |
2 6 |
|
||
some_doc.html. . 2 — post --> |
|
||||||
|
<input |
type=text |
name=edit1 value=""> |
<!-- |
R = 8 A 9 2 F 8 (C value=””) 6 2.
2 2 6 2, @A ; 2 9 C 2 9 edit1, C @ 2 A '9 edit1
--> |
type=submit |
name=buttonOk |
<input |
value="Ok"> <!-- R = 8 A 9 2, 2 -
9 C 6 http 2 --> </form> <!-- [ 6 / 8 A 9 -->
</p> |
<!-- ; = 6 / 8 A 9 --> |
|
<p> |
<!-- N 6 ? 2 ; = --> |
|
<ul> |
<!-- 6 ; 2 --> |
|
<li>ZG.bи0 G5G2G*- ,3и,1Q |
<!--R 8 A 9 6 ? |
|
2. --> |
|
|
<li>a.QPи0 G5G2G*- ,3и,1Q |
<!--R 8 A 9 B |
|
--> |
|
|
</ul> |
<!-- O2 6 / 8 A 9 --> |
|
</p> |
<!-- ; = 8 A 9 --> |
|
</body> |
<!-- : 8 A 9 --> |
|
</html> |
<!-- : 8 A 9 html --> |
; 3.12 ', K WEB-
.
52
> 3.12 – @ html
3.2.3.3 . # . GET $ POST
? - 0 * 0 -, K 0 . A K
* 0 . A K -
. ; e 0 ' K GET POST. A 1# . 1 GET 0 URL-
K 0 (HTML )
*. ;, i ,
0 e . @ , i
i , 0 ’ -
“=”. x i K -
, (“&”). ;, http://some_example.com/page.html?num=10&type=new&v=text. -
page.html 3 : num
10, type “new” v “text”. /
e web- , ' K GET , .
# . POST & K ( -
, HTML-*) . ;, -
' HTML- *, 0 POST, - i K . & (
— ) 0 0 . <,
53
e , -.
3.2.3.4 " Z _1 ./Z % # Z GET $ POST ! -
$%
A , i * 0 -, * web- . 0
— i. &, , i
<form> i , action method. &- e 0 , . x i -
, 0
. 4 method ' 0 get post, - ' , .
A , i ( -
) * <input type=text name="text1" size=20 value=””>. & , ,
text1, '
.
A , i ' , ', -
, . A
<input type="submit" value="@">
&:
<html> |
<!-- html --> |
|
<head> |
<!-- head --> |
|
<meta |
http-equiv="Content-Type" |
content="text/html; |
charset=UTF-8" /> <!--. / 0 ( 2 -). 5 6 78 2 (text/html) 6 9
-->
<title>Z.и15+S HTML-S/1Q2G*-Q</title> <!--: ; 6 -
--> |
|
</head> |
<!--: 9 head--> |
<body> |
<!-- --> |
<form |
action="" method=get> <!--O 6 9 =. : 2 |
C 2 6 some_doc.html. . 2 — post -->
<input type=text name=edit1 value=""> <br/> <!--
R = 8 A 9 2 F 8 (C value=””) 6 2.
2 2 6 2, @A ; 2 9 C 2 9
edit1, C @ 2 A '9 edit1 -->
<input type=radio name=radio_button1 value=checked/> d+.и+*-1 <br/> <!--R 6 9 radiobutton. \-
54
B 6] C 6] ] ? C 2 2 radio_button1 9 checked. 5 / 6 2 @ ? 2 C 2-->
<input type=radio name=radio_button2 value=checked/> d+.и+*-2 <br/>
<input type=checkbox name=checkbox value=checked/> d15/XR15 <br/> <!--R 6 9 checkbox. \ B 6 C 6 ?, C 2 2 checkbox
9 checked. ^ / C 2 ;-->
<input type=hidden name=hidden value="it's_hidden"/> <!--R 6 9 2 E 6 ; 2 9. :_6 9 @A C 2 hidden=it's_hidden-->
<input type=submit name=buttonOk value="Ok"> <!- - R = 8 A 9 2, 2 9 C 6-
http 2 -->
</form> <!-- [ 6 / 8 A 9 -->
</body> |
<!-- : 8 A 9 --> |
</html> |
<!-- : 8 A 9 html --> |
; 5, 00 e . @ -
: ?edit1=&hidden=it's_hidden&buttonOk=Ok
< , i edit= , . & hidden ' K. 2 ,
' ' K.
x i radio_button1, i
radio_button1=checked%2F. 4 radio_button2 checkbox.
3.3 %. Z .
3.3.15 .
3.3.2? java-#" ! . 1 ] 2 IDE Eclipse.
3.3.3A 0 -
0 0 Mercurial.
3.3.4; -
java, i K :
– , i -
;
–;
–( ,
, . .)
55
– .
3.3.5@
IDE Eclipse, Windows.
3.3.6& . & -
– .
3.3.7? -
Mercurial.
3.3.8& 0
Mercurial.
3.3.9HTTP Apache Tomcat.
3.3.10' - .
3.3.11@ - :
–;
–0 ;
–' - ;
–' ' e - .
3.3.12@ - : -
- .
3.3.13? html- $", i K -
:
– , ;
– , ', ;
– *;
– 0;
– ;
– ;
– ';
– *, i K '
get.
3.3.14& .
3.3.15@ , 0 *, i
WEB- .
3.3.165* .
3.4 1$ !%$
3.4.1< .
3.4.2! /# ] java-. . ".
56
3.4.3& java- i Eclipse.
3.4.4< ( ).
3.4.5> IDE Eclipse.
3.4.6> Windows.
3.4.75 , Apache Tomcat.
3.4.84 - Apache Tomcat.
3.4.95 , 0, ' -
' - .
3.4.104 -
.
3.4.115 WEB- $" .
3.4.12< WEB- .
3.4.13> .
3.4.14> .
3.4.15@, i ,
' ' 0
.
3.5 /^$ Z
3.5.1A 0 IDE?
3.5.2x IDE @ K?
3.5.3@ IDE?
3.5.4& @ IDE.
3.5.5ƒ Quick Fix?
3.5.6x e
IDE Eclipse?
3.5.7x 0 Eclipse?
3.5.8x ' Eclipse?
3.5.9x e Eclipse?
3.5.10; i apache?
3.5.11A K HTTP?
3.5.12x e K 0 Eclipse Apache Tomcat?
3.5.13x e - ,
Tomcat?
3.5.14x 0 * * Apache Tomcat?
3.5.15; * *
- Tomcat?
57
3.5.16x debug - ?
3.5.171 ' JVM -
, Tomcat?
3.5.18x e 0 , i ' K
0 , i Tomcat?
3.5.19x , i Tomcat
0 - ,
?
3.5.20A 0 Apache Tomcat?
3.5.21x , i Tomcat 0 '
ip- ?
3.5.22ƒ HTML?
3.5.23A K HTML?
3.5.24;, HTML .
3.5.25ƒ HTML- ? K?
3.5.26ƒ ? ;, K.
3.5.27< .
3.5.28< * .
3.5.29ƒ GET POST?
3.5.30' GET POST?
3.5.31x ' 0 -
?
3.5.32ƒ * HTML? ; i ?
3.5.33> ' , *.
3.5.34x ' *?
58
4 P G G G P 4 G G P G
4.1 #
@
Apache Tomcat IDE Eclipse.
4.2 "$ # # S$ %$. 1$
? – , java,
. A " -
", ' Apache Tomcat.
> 0 IDE Eclipse
. >
:
Hello, World!
4.2.1 2% Z Eclipse
7 , , i '
0 TomcatEclipse.
x i , i 0 K,
0 . z -
. 4.1.
> 4.1 – ' 0 K Tomcat
59
/ 0 ,
Tomcat, i . ƒ Tomcat- , i 0
e Tomcat- ,
0 Eclipse. @ e Window>Preferences, '
0 Eclipse 0 K0
0 Tomcat ' . & -
0 Tomcat ( . . 4.2).
> 4.2 – ; Tomcat
; 0, , Version 5.x
e Tomcat (C:\Program Files\Apache Software Foundation\Tomcat 5.0). A Context files '-
e . & ' 0 0
JVM Settings , i 0 0
JRE. ' JRE -
60
, JDK, ' Eclipse
0 Java>Installed Jres.
& ' OK. & -
Tomcat- .
4.2.2 % # Z Tomcat-#"
& 0 K Tomcat e K ' Web-
0, i K Tomcat. x i
File>Qew>Project 0 Java
( . . 4.3), '
: Tomcat project.
> 4.3 – ; Tomcat-
A ' Qext, , , "Helloworld" ' Finish. x i '