2013년 4월 27일 토요일


1. An Invitation to Servlets

This first chapter answers the question "What is a Servlet?", shows typical uses for Servlets, compares Servlets to CGI programs and explains the basics of the Servlet architecture and the Servlet lifecycle. It also gives a quick introduction to HTTP and its implementation in the HttpServlet class.

1. 서블릿 소개

첫번째 챕터는 "서블릿은 무엇이가"에 대하여 답하고, 서블에 대한 일반적인 사용법을 보여준다. 그리고 서블릿을 *CGI프로그램과 비교하고, 서블릿 아키텍쳐와 서블릿 라이프사이클의 기본적인 것을 설명한다. 또한 HTTP와 HttpServlet클래스의 HTTP 구현체에 대한 간단한 소개도 제공한다.



1.1 What is a Servlet?

Servlets are modules of Java code that run in a server application (hence the name "Servlets", similar to "Applets" on the client side) to answer client requests. Servlets are not tied to a specific client-server protocol but they are most commonly used with HTTP and the word "Servlet" is often used in the meaning of "HTTP Servlet".
Servlets make use of the Java standard extension classes in the packages javax.servlet (the basic Servlet framework) and javax.servlet.http (extensions of the Servlet framework for Servlets that answer HTTP requests). Since Servlets are written in the highly portable Java language and follow a standard framework, they provide a means to create sophisticated server extensions in a server and operating system independent way.
Typical uses for HTTP Servlets include:
  • Processing and/or storing data submitted by an HTML form.
  • Providing dynamic content, e.g. returning the results of a database query to the client.
  • Managing state information on top of the stateless HTTP, e.g. for an online shopping cart system which manages shopping carts for many concurrent customers and maps every request to the right customer.


서블릿은 자바코드의 모듈이다/그것은 [클라이언트의 요청에 답하는] 서버 Application단에서 구동된다. 서블릿은 하나의 특정 C/S 프로토콜로 묶이지 않지만, 가장 일반적으로 HTTP와 함께 사용되며, 종종 "Servlet"이라는 단어는 "HTTP Servlet"의 의미로 사용된다. 서블릿은 [javax.servlet와 javax.servlet.http 패키지내의] 자바 표준 확장 클래스를 사용한다. 서블릿은 쓰여지기 때문에/ 상당히 휴대가 쉬운 자바언어에서 그리고 표준 프레임워크를 따르기 때문에, 서블릿은 서버와 운영체제에 독립적인 방식으로 정교한 서버 확장자를 만드는 수단을 제공한다.
HTTP Servlet의 일반적인 사용법은 아래를 포함한다.

  • 하나의 HTML폼에 의해 전달된 (and/or)저장 데이터를 처리한다.
  • 동적인 컨텐츠를 제공한다. 예를 들어, 클라이언트에 쿼리의 결과값을 보낸다.
  • 상태가 없는 HTTP의 최상단에서 상태 정보를 관리한다. 예를 들어, [다수의 동시다발적인 고객의 쇼핑카트를 관리하고 모든 요청을 그것에 맞는 고객에게 매핑하는] 온라인 쇼핑 카트 시스템

















댓글 없음 :

댓글 쓰기