java

JSP-์‹œ์ž‘ํ•˜๊ธฐ(2)

dev_summer 2020. 10. 28. 13:49

 

- ์Šคํ”„๋ง ํˆด ์‹คํ–‰

 

- workspace, css files, html files, jsp files ์ „๋ถ€ utf-8๋กœ ๋ณ€๊ฒฝ

 

tip.

- euc-kr ์€ ์™„์„ฑํ˜•๊ธ€์ž. ํ…Œ์ด๋ธ”์•ˆ์— ๊ฐ•,๊ฐ ์ด๋Ÿฐ ์‹์œผ๋กœ ์™„์„ฑํ•œ ๊ธ€์žํ…Œ์ด๋ธ”์ด ์žˆ์Œ. ์ด์™ธ์˜ ์™„์„ฑํ˜•์ด ๋“ค์–ด์˜ค๋ฉด ๊ธ€์ž๊ฐ€ ๊นจ์ง

- utf-8์กฐํ•ฉํ˜• ๊ธ€์ž (1byte) ใ…(1byte) ใ„ฑ(1byte) , ๋ชจ์Œ์ž์Œ ํ•˜๋‚˜๋งˆ๋‹ค 1byte์”ฉ ๋ถ€์—ฌํ•˜์—ฌ ์‚ฌ์šฉ

 

 

 

 

 

ํ†ฐ์บฃ์„ ์œ„ํ•œ ๋‹ค์ด๋‚˜๋ฏน

 

 

๊ตฌ์ฒด์  ๊ฒฝ๋กœ ์žก์•„์ฃผ๊ธฐ

.classํŒŒ์ผ์€ build#classes ๋กœ ๊ฐ

 

context root : localhost:8000/firstapp์œผ๋กœ ์ง„์ž…ํ•˜๊ฒŸ๋‹ค ์•„ํŒŒ์น˜์˜ ์ตœ์ข… ์—”๋“œํฌ์ธํŠธ

content dirrectory : ์ •์ ์ธ ํŒŒ์ผ๋“ค, html, text ๋™์ ์ธ ํŒŒ์ผ์€ src์— ๋„ฃ์Œ

context-path : ๋‚ด ์›น์„œ๋ฒ„(ํ”„๋กœ์ ํŠธ) ์ง„์ž…๋กœ

ํ”„๋กœ์ ํŠธ : firstapp

context path : firstapp

 

http://localhost:8000/ c:\src\singWork

http://localthost:8000/secondapp c:\src\singSork\firstapp

 

์ง„์ž…๋กœ(์ปจํ…์ŠคํŠธํŒจ์Šค)์™€ http์˜ ์ด๋ฆ„์ด ๊ฐ™์„ ํ•„์š”๊ฐ€ ์—†๋‹ค.

๋‚ด ํด๋”๋ฅผ ๋…ธ์ถœ์„ ํ•˜์ง€์•Š์•„๋„๋˜๋Š” ์žฅ์ ์ด ์žˆ๋‹ค.

 

*DNS(domain name server)

http://ip์ฃผ์†Œ:ํฌํŠธ/์ปจํ…์ŠคํŠธํŒจ์Šค-> http://๋„๋ฉ”์ธ์ฃผ์†Œ๋กœ ๋ฐ”๊ฟˆ

์‚ฌ์šฉ์ž๋Š” DNS์„œ๋ฒ„์— ๋ฆฌํ€˜์ŠคํŠธํ•˜๊ณ  DNS์„œ๋ฒ„๋Š” ๋“ฑ๋ก๋œ ํŠน์ •์•„์ดํ”ผ๋กœ ๋‹ค์‹œ ๋ฆฌํ€˜์ŠคํŠธํ•œ๋‹ค.

ํŠน์ •์•„์ดํ”ผ๋Š” ์„œ๋ฒ„๋กœ ๋ฆฌ์Šคํฐ์Šคํ•œ๋‹ค.

 

 

 

 

 

 

๋Œ€ํ‘œ์‚ฌ์ง„ ์‚ญ์ œ

์‚ฌ์ง„ ์„ค๋ช…์„ ์ž…๋ ฅํ•˜์„ธ์š”.

WebContent : ๋ณด์•ˆ์ด๋ž‘ ์ƒ๊ด€ ์—†๋Š” ํŒŒ์ผ, ๋…ธ์ถœ๋˜๋„ ๋˜๋Š” ํŒŒ์ผ(src๋Š” ์ ‘๊ทผํ•˜์ง€ ๋ชปํ•œ๋‹ค.)

๋Œ€ํ‘œ์‚ฌ์ง„ ์‚ญ์ œ

์‚ฌ์ง„ ์„ค๋ช…์„ ์ž…๋ ฅํ•˜์„ธ์š”.

firstapp์ด ๊ธฐ๋ณธ / ๊ฐ’์ด๋‚˜ webcontent/๊ฒฝ๋กœ๋Š” ์•ˆ์จ๋„๋œ๋‹ค. ์›๋ž˜ ์›น์ปจํ…ํŠธ๊นŒ์ง€๋ฐ–์— ๊ฐ€์ง€๋ชปํ•˜๊ธฐ๋•Œ๋ฌธ์— ๊ธฐ๋ณธ์œผ๋กœ ์›น์ปจํ…ํŠธ๊ฐ€ ๊ธฐ๋ณธ ๊ฒฝ๋กœ์ด๋‹ค.

๋Œ€ํ‘œ์‚ฌ์ง„ ์‚ญ์ œ

a.txt ์™€ b.txt ๋Š” http://๋กœ ์™ธ๋ถ€์ ‘๊ทผ์ด ๋ถˆ๊ฐ€ํ•˜๋‹ค.

- meta-inf : ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ •๋ณด

- web-inf : ์ค‘์š”ํ•œ ์ •๋ณด๋“ฑ

 

์™ธ๋ถ€์—์„œ ์ ‘๊ทผ ๋ถˆ๊ฐ€

 

 

 

 

์„œ๋ฒ„๋ฅผ ๋งŒ๋“œ๋Š” ๋‘๊ฐ€์ง€๋ฐฉ๋ฒ•

 

 

์™ผ์ชฝ - ์šฐํด๋ฆญ ๋‰ด ์„œ๋ฒ„, ์˜ค๋ฅธ์ชฝ ์šฐํด๋ฆญ - ๋Ÿฐ์—์ฆˆ

 

 

 

 

 

/index.html์„ ํƒ€์ดํ•‘ํ•˜์ง€์•Š์•„๋„ ์ž๋™์œผ๋กœ index๋ฅผ ์ฐพ์•„๊ฐ„๋‹ค.

 

'java' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

jsp ๊ธฐ์ดˆ  (0) 2020.10.30
JSP ๊ธฐ๋ณธ๊ตฌ์กฐ  (0) 2020.10.30
jsp์™€ ์„œ๋ธ”๋ฆฟ๋ฐฉ์‹  (0) 2020.10.28
์ฟผ๋ฆฌ์ŠคํŠธ๋ง  (0) 2020.10.28
JSP-์‹œ์ž‘ํ•˜๊ธฐ(1)  (0) 2020.10.28