ํฐ์คํ ๋ฆฌ ๋ทฐ
package test;
//servlet 1 import 3๊ฐ
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
//servlet 2 ๋ฐ๋์ public ํด๋์ค๋ก ์์ฑ
public class HelloWorld
//servlet 3 HttpServlet์ ์์๋ฐ๊ธฐ
extends HttpServlet {
//servlet 4 ์ ์ก๋ฐฉ์์ ๋ฐ๋ผ doXXX() ๋ฉ์๋์์ฑ
// get ๋ฐฉ์ -> doGet()
// post๋ฐฉ์ -> doPost()
// ์ ์ก๋ฐฉ์๊ณผ ์๊ด์๋ค๋ฉด -> service()
//์๋์ doGet ๋ฉ์๋๋ ๋ฉ์๋๋ฅผ ์์ฑํ๋ ๊ฒ์ด ์๋ ์ค๋ฒ๋ผ์ด๋ฉ ใ
ใ
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
//servlet 5 ์ถ๋ ฅ์คํธ๋ฆผ, ์ถ๋ ฅ๋ฌธ์ํ์
์ง์
response.setContentType("text/html;charset = euc-kr");
PrintWriter out = response.getWriter();
//servlet 6 ๋น์ง๋์ค ๋ก์ง ์ฒ๋ฆฌ
}
}
'PROGRAMMING' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
jsp ์๋ฌํ์ด์ง ์ง์ (0) | 2010.06.22 |
---|---|
sqlinform.com/online.phtml (0) | 2010.06.16 |
์ด๊ฒ์ด ์ค์์ธ๊ฑฐ์ผ? (0) | 2010.05.29 |
๋ก๋์์ฑ๊ธฐ ใ ใ (0) | 2010.05.15 |
Model1 ๋ฐฉ์ (0) | 2010.05.14 |
- Total
- Today
- Yesterday
- php
- ์น์์ด์ ์
- JavaScript
- I Don't Care
- ์๋ฆฌ
- Java
- JSTL
- ์๋ฐ์คํฌ๋ฆฝํธ
- JSP
- 8๋ง์ผ
- EL
- ๊ธฐํ
- ํจ์
- MS-SQL
- MySQL
- ๋ฉ๋ฐฐํ
- JS
- ์ธํจ์ด
- asp
- ์๋ธ๋ฆฟ
- jQuery
- ๊ฒฝ์ ์ฉ์ด
- ์นด๋ฐ์จ๋ผ์ธ
- 2ne1
- Ajax
- ์์์ฌ์ด๋
- Servlet
- ๋์ค
- JSON
- ๋ณต๊ทผ์ด๋
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |