??????????(???) JSP ?? ??? ??? JSP ?? - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

??????????(???) JSP ?? ??? ??? JSP ??

Description:

Title: Author: Microsoft Corporation Last modified by: Sungjick Created Date: 10/5/2006 4:04:58 AM Document presentation ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 41
Provided by: Microso125
Category:
Tags: jsp | java | servlet

less

Transcript and Presenter's Notes

Title: ??????????(???) JSP ?? ??? ??? JSP ??


1
??????????(???)JSP ?? ??? ??? JSP ??
  • 2008? 9? 11? ??

2
??
  • ????
  • JSP ?? ??? ??? JSP ??
  • ??
  • JSP ? ?????? ?? ??
  • JSP ??????
  • ??? JSP ?? ?? ??? ?? ?? ?? ??
  • ??
  • JSP ? ????? ??
  • JSP ??????
  • Java SE Development Kit ??
  • Apache Tomcat ??
  • Eclipse ??
  • ??? Java ????? ??
  • ??? JSP ??
  • ????

3
?? ???? ? ?????ltWWW(World Wide Web) ? ??gt
  • WWW? ?? HTML URL HTTP
  • HTML(HyperText Markup Language)
  • Hypertext? ?? SGML
  • ????? ? ???? ???? ?? ????? ??
  • URL ( Uniform Resource Locator )
  • ? ??? ??? ??
  • Fragment identifier
  • ?? ??? ??? ??
  • http//www.w3.org/TR/HTML4/minitoc
  • HTTP ( HyperText Transfer Protocol)
  • WWW ??? ??? ?? ?? ? ?? ????
  • TCP/IP ????? ????, 80? ??? ????.

SGML (Standard Generalized Markup Language) ???
Markup Language
Hypertext
Hyperlink ? ???? ?? ??
Markup Language
???? ??? ???? ??
http//www.w3.org/TR/html14/
scheme
server
path
protocol?? ?? ??? ??? ??? ??? ?? ?? ?? ??
?? ???? ?? ??
WWW http 80 ? ???
Email SMTP/POP3/IMAP 25/110/143 ??? ???
FTP ftp 21 ???? ???
TCP/IP????, ????, ?? ??? ???? ??? ? ?? ??? ??
????
4
?? ???? ? ?????ltHTML? ??????gt
lthtmlgt ltheadgt lttitlegt??? ??lt/titlegt lt/headgt ltbody bgcolorwhitegt lth1gtGood Advice for Everyday lifelt/h1gt lth2gtFor UNIX programmerslt/h2gt ltbgtNeverlt/bgt type ltpgtltttgtrm rf /lt/ttgtltpgt on your computer. lth2gtFor Nuclear Scientistslt/h2gt ltbgtNeverlt/bgt press the ltigtBig ltfont colorredgtRedlt/fontgt Buttonlt/igt. lt/bodygt lt/htmlgt
html HTML ???? ??
head ???? ?? ??? ???? Head ?? ??
title ??? ??? ??
body ??? ???? ??? ???? body ?? ??
h1 h6,b,p,I,tt, font ??? ???? ??? ??? ????
?? ??
HTML element HTML ??? ??? ??, ????? tag?? ??
? ?????? ??? ??
5
?? ???? ? ?????lt? ????? ??gt
  • CGI (Common Gateway Interface)
  • ?? ? ????? ??? ??? ??, ??? ?? ???? ??
  • C ??, Perl ?? ??? ????? ??? ?????, ? ???? ?? ????
    ???? ?? ??? ?? ??, ???? ??? HTML ? ???? ??? HTML
    ?? ???? ???? ???? ??
  • Server Script ??
  • HTML? ???? ??? ?????? ??? ? ?? ??? ??
  • ????? ???? ??? ??? ???? ??
  • CGI ???? ?? ??? ????, ???? ???? ???? ???? ????,
    HTML ?? ??? HTML ?? ??? ??
  • Server Script ??? ??
  • ASP(Active Server Page)
  • PHP(Professional Hypertext Preprocessor)
  • JSP(Java Server Page)

?? PerlScript, JScript, VBScript ? ??? ???? ?? ?? VBScript? ??? ?? ?? ???? ?? ??
?? Windows ????? IIS ? ????? ??
?? ???? ????????, ??? ????? ? ?? ???? ?? ?? ?? ?? ??, ??? ?????? ?? ?? ?? ??
?? ?? ????? ??? ???? ????? ????? ??? ?? ?? ????? ??? ?? ?? PHP ???? ?? ???? ??? ??????, ??? ??? ?? ?? ??? ???
?? Servlet??? ?? ? ????? ??? ????, HTML ? ?? ????? ??? ? ?? ???? ??? ?? ?? ??? ??? ???? ?? ???? ??? ?? ?? Java ?? ??? ???? ??? ??? ? ??
?? ?? ??? ?? ?? Servelt ???? ?? ??? ??
6
?? Java? Servlet ??? JSPltJava? Servlet, JSP ??gt
  • Java(??)
  • Sun Microsystems ?? ??? ????? ?????
  • Java? C ??? ???? ????? ??? ???? ??? C? ???
    C??? ??
  • Java? ??? ????? bytecode?? ??? ???? ??? ????,
    Java Virtual Machine(JVM ?? ?? ??) ??? ??? ?? ???
    ??? ??? ????? ?? ????, CPU? ????? ??? ???? JVM?
    ??? ? ?? ?????? ???? ??? ? ??
  • Servlet(???)
  • ??? ???? ???? ??? ??? ????? ???? ???? ??? ???? ??
    ? ??
  • Java ??? ? ?????? ?? ?? ??? ??
  • ???? ?????? ??? ????? ???? ?? ??? ??
  • JSP(Java Server Page)
  • Java Servelt ??? ?? ???? ??
  • ??
  • ?? Servlet?? ???? ?? ????? ???? ?? ??? ??? ?? ??
  • JSP ?? ?? Servlet? ??? ?? ??
  • Java? ?? ?? ?? ??
  • ??? ?? ?? ? ?? ???? ??? ? ??

7
?? Java? Servlet ??? JSPltJSP ?? ??gt
Apache HTTP Server, Microsoft IIS ?? Web Server?
??
  • JSP ?? ???

Web Server
JSP ??? ??
Client PCWeb browser
HTML ??(???) ??
Apache Tomcat? Servlet Container? ????, ??? Web
Server ??? ??
  • JSP ?? ??
  • ???? ? ????? ? ??? JSP ??? ??
  • ? ??? ?? ??? ????, Servlet Container? ??? ??
  • Servlet Container? JSP ??? ???? Servlet? ?????
    ??? ????, ?? ?? ????? ??
  • Servlet ?? ?? ? ?????? ?? ??? ???, ??????? ????
    ???
  • ??? ?? ??? HTML ??? ? ??? ??
  • ? ??? ????? HTML ?? ??

Servlet Container
???? JSP ??? ???? ???? ???
???
JSP??? Servlet ?? ???
?
???? Servlet? ????? ??
Servlet ??
?????? ?? ?? ???
?
???
?? ?? Web Server? ??
?????? ????
??????
8
??
  • HTML (HyperText Markup Language)
  • ????? ? ???? ???? ?? ????? ????, Hyperlink ?
    ???? ?? HyperText? ???? ?? Markup language
  • URL (Uniform Resource Locator)
  • ? ??? ??? ???? ?? ??
  • HTTP (HyperText Transfer Protocol)
  • WWW ??? ??? ?? ?? ? ?? ??
  • ? ????? ??
  • CGI (Common Gateway Interface) ??? ? ??? ?? ??
    ? ????? ??? ??? ??
  • Server Script ?? HTML ? ???? ??? ?????? ??? ?
    ?? ??? ????, ASP(Active Server Page),
    PHP(Professional Hypertext Processor), JSP(Java
    Server Page) ?? ??
  • JAVA
  • Java Virtual Machine ??? ???? ??? ???? ?????
    ????? ??
  • Servlet
  • Java ??? ? ?????? ?? ?? ??? ??
  • JSP(Java Server Page)
  • Servlet ??? ?? ???? ??, ??? ??? ??
  • Java ? ??
  • Java SE Standard Edition(???), ???? ?? ?????
  • Java EE Enterprise Edition(???), ???? ???? ???
    ????? ??? ??
  • Java ME Micro Edition(???), ????? PDA ? ????
    ???
  • Apache HTTP Server? Apache Tomcat
  • Apache HTTP Server? ?? ????? HTTP ? ????, Apache
    Tomcat? Servlet Container? ?? ? ?????? ????.
    Tomcat? ??, ??? ???? ???? ?? Apache HTTP Server?
    ???? ????? ??.

9
?? ??
  • ??? JSP ?? ?? ??? ??? ???? ??? ??
  • ?? ??
  • ?? ??

lt_at_ page language"java" contentType"text/html
charsetEUC-KR pageEncoding"EUC-KR"gt lt!DOCTYPE
html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http//www.w3.org/TR/html4/loos
e.dtd"gt lthtmlgt ltheadgt ltmeta http-equiv"Content-Ty
pe" content"text/html charsetEUC-KR"gt lttitlegtHe
llo World, my first jsplt/titlegt lt/headgt ltbodygt ltce
ntergt ltH2gtHelloWorld ????lt/H2gt ltHRgt ?? ??? ???
lt new java.util.Date() gt lt/centergt lt/bodygt lt/
htmlgt
10
?? JSP ?? ??
  • JAVA SE Development Kit
  • JAVA ? ????? ????
  • Sun Microsystems?? ??, ???? ???, GNU General
    Public License(GPL) ? ?? ????.
  • http//java.sun.com
  • Apache Tomat
  • Apache Software Foundation?? ??? Application
    Server
  • Java Servlet? JavaServer Pages(JSP) ??? ??
  • http//tomcat.apache.org
  • Eclipse
  • ??? ??? ??? ??? ???? ?? ?? ??
  • http//www.eclipse.org

11
?? Java SE Development Kit ??(1/2)
??
??
??
12
?? Java SE Development Kit ??(2/2)
??
prompt?? java version ??
JAVA ?? ??
13
?? Apache Tomcat ??(1/3)
??
??
??
??
14
?? Apache Tomcat ??(2/3)
Password??
??
??
??
15
?? Apache Tomcat ??(3/3)
???? ? Tomcat ??? ???
Apache Tomcat ???
Configure ??
Manual ??
2.Stop ??
Tomcat Tracy Icon?? ??? ??
3. ?? ??
16
?? Eclipse ??(1/3)
www.eclipse.org ??
??
??
??
17
?? Eclipse ??(2/3)
???? ?? ?? ??? ?? eclipse.ini ??? ??
-showsplash org.eclipse.platform -vmargs -Dosgi.re
quiredJavaVersion1.5 -Xms40m -Xmx512m -XXPermSiz
e64m -XXMaxPermSize128m
?? ??
workspace(????)????? ?? ?? ??
??
??
18
?? Eclipse ??(3/3)
???? ? ??? ???? ?? Show line numbers ?? ??
Text Editors ??
??
??
19
?? ?? ?? ??ltObject-Oriented Programminggt
  • Object-Oriented Programming(???? ?????)
  • ??? ?????? ????? ??
  • ??? ?????? ???? ???? ?? ???? ??? ?? ?? ??? ??, ?
    Object(??)?? ???? ????? ?? ?
  • Class(???)
  • ?? ???? attribute(??)? ???? ?? field?
    behavior(??)? ???? method? ??
  • Object(??)
  • Class? ??? ???? ??? instance
  • Object? ??? attribute? ???, Class? ??? behavior?
    ???
  • ?? ????? ??

C? ??? ??
Byte Code(class??)
Java Virtual Machine? ?? ??
?? ?? ??
???
20
????? Class? ??? Object??(1/4)
??? Java EE Perspective ? ???? ??
  • Perspective
  • Eclipse IDE?? ???? ??, ?????, ??? ?? ??? ?? ???
    ???, ?? ???? ??

??
Java ??
?? ??? Java Project ? ??? ??
Java Perspective ? ??
Java Project ??
??? ??
Java Project ??
??? Java Project ??
21
????? Class? ??? Object??(2/4)
??? ?? Java Project
??? ??
? java ?? ??(1)
Class ??
Class ???? Dog ??
  • public static void main(String args)
  • Java ????? ??? ? Java Virtual Machine ?? ???? ???
    method
  • ??? ?? ?? ??? ???? ?

???? ???? ??? main method? ???? ?? ??
? java ?? ??(2)
??
22
????? Class? ??? Object??(3/4)
??? Dog.java ??
  • name ??? String ?? ??
  • private ???? ?? ??? class??? ??

Dog Class? ?? ?? ??
  • Dog class? ??? ??, ??? String object (??)? ??
  • 2??? ??? name??? ??? ?? String ??? ????? ?
  • Dog class? bark method? ??
  • System.out.println method? ???? ??? ??? ??
  • Dog object? ???? myDog? ????? ?
  • myDog? ???? ?? Dog object? bark method ??

23
????? Class? ??? Object??(4/4)
Dog.java ? Java Application ?? ??
?? ??? Console ??? ??
Dog.java ?? ??? ??
Java Application ??
?? ??? Console?? ???
24
?? ?? ?? ?? lt ?? ??? ?? ??gt
  • Wrapper Class
  • ?? ??? Object? ??? ??? ???? ???
  • ????
  • ????
  • ?? ??? ??? ?? ???(class ??, array ??, String ??)

??? ?? ?? ??(bit) ??? ??? Wrapper Class
??? byte 8 -128 127 Byte
??? short 16 -215 (-32,768) 215-1 (32,767) Short
??? int 32 -231 (-2,147,483,648) 231-1 (2,147,483,647) Integer
??? long 64 -263 (-9,223,372,036,854,775,808) 263-1 (9,223,372,036,854,775,807) Long
??? ?? ?? ??(bit) Wrapper Class ??
??? float 32 Float 32-bit IEEE 754 floating-point numbers
??? double 64 Short 64-bit IEEE754 floating-point numbers
??? ?? ?? ??(bit) ??? ??? Wrapper Class
??? char 16 Unicode 0 Unicode 216-1 Char
??? ?? ?? ??(bit) ?? ? ?? ? Wrapper Class
??? boolean ??? ???? ?? true / false Char
25
?? ?? ?? ?? lt ???gt
Equality ,Relational Operators (??, ?? ???) Equality ,Relational Operators (??, ?? ???)
Equal to
! Not equal to
gt Greater than
gt Greater than or equal to
lt Less than
lt Less than or equal to
Conditional Operators (?? ???) Conditional Operators (?? ???)
Conditional -AND
Conditional-OR
? Ternay
Simple Assignment Operator (?? ?? ???) Simple Assignment Operator (?? ?? ???)
Simple assignment operator
Arithmetic Operators (?????) Arithmetic Operators (?????)
Additive operator
- Subtractive operator
Multiplication operator
/ Division operator
Remainter operaotr
Bitwise , Bit Shift Operators (?? ???) Bitwise , Bit Shift Operators (?? ???)
Unary bitwise oplement
ltlt Signed left shift
gtgt Signed righet shift
gtgtgt Unsigned right shift
Bitwise AND
Bitwise exclusive OR
Bitwise inclusive OR
Conditional Operators (?? ???) Conditional Operators (?? ???)
Conditional -AND
Conditional-OR
? Ternary
Unary Operators (?????) Unary Operators (?????)
Unary plus operator
- Unary minus operator
Increment operator
-- Decrement operator
! Logical compliment operator
Type Comparison Operator (? ?? ???) Type Comparison Operator (? ?? ???)
instanceof object ? ?? type?? ??
26
?? ?? ?? ?? lt ???(1/2)gt
if-then-else ? swith ?
int testscore 76 char grade if ( testscore gt 90) grade A else if ( testscore gt 80) grade B else if ( testscore gt 70) grade C else if ( testscore gt 60) grade D else grade F System.out.println(Grade grade) int month 8 switch (month) case 1 System.out.println(Jan) break case 2 System.out.println(Feb) break case 3 System.out.println(Mar) break case 4 System.out.println(Apr) break case 5 System.out.println(May) break case 6 System.out.println(Jun) break case 7 System.out.println(Jul) break case 8 System.out.println(Aug) break case 9 System.out.println(Sep) break case 10 System.out.println(Oct) break case 11 System.out.println(Nov) break case 12 System.out.prnitln(Dev) break default System.out.println(Invalid month.) break
???? Grade A ???? Aug
???
false
true ?? false?? ?? ???
month? 8??? case 8? ???
false
true
true??? ??? ?? else if, else?? ???
27
?? ?? ?? ?? lt ???(2/2)gt
for ? for-each ? while ?
for( ???????????) ??? for( ?????? Collections ?? ??) ??? while(????) ???
?? ????? ?? ? ????? ???? true?? ???? ??, false? ???? ??? ??? ??? ????? ???? true?? ?? ??? ?? ? ??? ??, ?? ???? ?? Java Collection(Set, List ?) ?? ??? ??? ???? ?? ??? ??? ? ???? ???? ?? ?? ????? ???? true?? ???? ????, false?? ???? ??? ??? ?? ? ?? ????? ???? ???? ?? ??? ??
for (int i 1 ilt9 i) System.out.println(Count is i) int numbers 1, 2, 3, 4, 5, 6, 7, 8 for ( int item numbers) System.out.println(Count is item) int count 1 while ( countlt9 ) System.out.println(Count is count) count
???? Count is 1 Count is 2 Count is 3 Count is 4 Count is 5 Count is 6 Count is 7 Count is 8 ???? Count is 1 Count is 2 Count is 3 Count is 4 Count is 5 Count is 6 Count is 7 Count is 8 ???? Count is 1 Count is 2 Count is 3 Count is 4 Count is 5 Count is 6 Count is 7 Count is 8
28
?? ? ?? ??? ?? ???(1/3)java.util.ArrayList
29
?? ? ?? ??? ?? ???(2/3)java.util.HashMap
30
?? ? ?? ??? ?? ???(3/3)java.util.Date
31
??
  • Object-Oriented Programming
  • ?? ????? ??? ????? ???? ?? Object? ???? ??? ????
    ????? ????
  • Class
  • attribute? behavior? ?? ?? ?? ???? ??? ??
  • Object
  • class? ?? instance
  • Java? ?? ??
  • byte, short, int, long, float, double, char,
    boolean
  • Class? method? ??
  • Class? ??? ???? ???? ??? ???? ?? ??? ???? ??? ??
    ? ??? ??? ???? ?? ?? ???
  • method? ??? ???? ???? ??? ???? ?? ??? ???? ?? ??
    ? ??? ??? ???? ?? ?? ???
  • Java ??? ??
  • ?? ???? ??? ???? ?? ??? ??????, Eclipse?? java
    ??? ?? ?? ??, ???? ???? ????
  • ??? ??
  • // ?? ?? ??? ????
  • / / ??? ?? ?? ????

32
?? ??? JSP ??(1/6)
  • Dynamic Web Project ??(1/2)
  • HelloWorld.jsp ?? ?? ??
  • Tomcat Server??? ???

??? ??
Project Explorer View???? ??,??
Outline View??? ???? ?? ??? ??
1. Project Explorer?? ??? ??
2. Dynamic Web Project??
33
?? ??? JSP ??(2/6)
  • Dynamic Web Project ??(2/2)
  • HelloWorld.jsp ?? ?? ??
  • Tomcat Server??? ???

3.Apache Tomcat v5.5 ??
1.Project Name?? ??
4.??
2.??? ??? ?????? New ??
5.Browse ???? Tomcat ? ??? ??? ??
6.??
34
?? ??? JSP ??(3/6)
  • Dynamic Web Project ??
  • HelloWorld.jsp ?? ?? ??(1/2)
  • Tomcat Server??? ???

??? Dinamic Web Project? Project Explorer?? ???
? ??
1.WebContent?? ??? ??
2.JSP ??
3.HelloWorld.jsp? ?? ?? ??
4.??
35
?? ??? JSP ??(4/6)
  • Dynamic Web Project ??
  • HelloWorld.jsp ?? ?? ??(2/2)
  • Tomcat Server??? ???

page ???? ??????? ?? ??
lt_at_ page language"java" contentType"text/html
charsetEUC-KR pageEncoding"EUC-KR"gt lt!DOCTYPE
html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http//www.w3.org/TR/html4/loos
e.dtd"gt lthtmlgt ltheadgt ltmeta http-equiv"Content-Ty
pe" content"text/html charsetEUC-KR"gt lttitlegtHe
llo World, my first jsplt/titlegt lt/headgt ltbodygt ltce
ntergt ltH2gtHelloWorld ????lt/H2gt ltHRgt ?? ??? ???
lt new java.util.Date() gt lt/centergt lt/bodygt lt/
htmlgt
Eclipse?? ???? ??? ??
??? ??? ??? ????? ??
36
?? ??? JSP ??(5/6)
  • Dynamic Web Project ??
  • HelloWorld.jsp ?? ?? ??
  • Tomcat Server??? ???(1/2)

????? ?? ?????? ???
1. HelloWorld.jsp?? ??? ??
3. ??
2. Tomcat ????? ??? ?? Run on Server??
37
?? ??? JSP ??(6/6)
  • Dynamic Web Project ??
  • HelloWorld.jsp ?? ?? ??
  • Tomcat Server??? ???(2/2)

Eclipse ?? ?????? ??? ??
Tomcat? Eclipse? ???? ???? ??
38
????
  • ??? JSP ?? HelloWorld.jsp ? ???? ??? ?? ??? ???
    ??? ??? ??

39
??
  • Java Development Kit (JDK)
  • ?? ?? ????? ??? ? ??? Sun Microsystems?? ????
    ????? ?? ??
  • Apache Tomcat
  • Apache Software Foundation ?? ??? Application
    Server. Java Servlet ? JavaServer Pages(JSP) ???
    ?????.
  • Eclipse
  • ?? ???? ??? ?? ???? open-source Integrated
    development environment(IDE)
  • Eclipse ? Perspective
  • Eclipse? Model ??? User Interface ???? ???? ???
    ???? ?? ? ???? ???? User Interface ??? ????? ????
    ??, Perspective ??? ??
  • Perspective ? ???? ???? ????? ???? ?? View? ????
    ????.
  • JSP ?????? ???? ????? Java EE Perspective ? ????.

40
????
  • ??, ??, ?? ? ? ?? ??? ???? ?? ???? ??? ??? HTML?
    ? ?? ??? ???? ??. ?? ??? 10? ??, ???? ?? 5? ??(??
    ??, ?? ?? ??)??? ??.
  • ??? ???? ??? ??, ??, ??? ????.
  • ???? ??? ??? ?? ??? ???, ?? ?? ?? ??? ???? ??.
Write a Comment
User Comments (0)
About PowerShow.com