글
Called by the server (via the
service
method) to allow a servlet to handle a OPTIONS request. The OPTIONS request determines which HTTP methods the server supports and returns an appropriate header. For example, if a servlet overrides doGet
, this method returns the following header:Allow: GET, HEAD, TRACE, OPTIONS
There's no need to override this method unless the servlet implements new HTTP methods, beyond those implemented by HTTP 1.1.
- Parameters:
req
the
object that contains the request the client made of the servletHttpServletRequest
resp
the
object that contains the response the servlet returns to the clientHttpServletResponse
- Throws:
java.io.IOException
if an input or output error occurs while the servlet is handling the OPTIONS requestjavax.servlet.ServletException
if the request for the OPTIONS cannot be handled
//아까 분석한 대로 내가 재정의한 HttpServlet 파생 클래스부터 HttpServelt 이전 까지 정의도니 내가
//"재정의한" 메서드들 리턴.
//너무 직관적인 코드니 생략. get은 <a> <img>였나? 이미지나 문자 보낼때 자동으로
//get메서드 실행되고, 그외엔 보안등 강점을 이유로 대부분 post로 사용한다고
//했었던 기억이 뇌리를 스침..
//오 위에서 직관적이라 표현한 부분이 아래의 처리를 위해서 그런거였구나..
//내가 재정의한 메서드를 통해 나만의 스타일로 스크립트 문자열을 만들어주고 있는듯?
Called by the server (via the
service
method) to allow a servlet to handle a TRACE request. A TRACE returns the headers sent with the TRACE request to the client, so that they can be used in debugging. There's no need to override this method.- Parameters:
req
the
object that contains the request the client made of the servletHttpServletRequest
resp
the
object that contains the response the servlet returns to the clientHttpServletResponse
- Throws:
java.io.IOException
if an input or output error occurs while the servlet is handling the TRACE requestjavax.servlet.ServletException
if the request for the TRACE cannot be handled
//캐리지 리턴과 라인 넥스트의 조합? 한칸 내리고 제일 앞으로 땡기고? 타이핑?
// == 엔터키를 쳣을때 입력되는 값을 의미한다. (엔터치면 \r\n 이 들어옴)
// TRACE 도 스크립트 언어인듯함? 유저의 url주소 적어주고, 유저가 보낸 프로토콜(일반적으론 http)
//적어주고
//아직 기본개념및 이해가 부족하다...
/*
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
*/
Receives standard HTTP requests from the public
service
method and dispatches them to the do
XXX methods defined in this class. This method is an HTTP-specific version of thejavax.servlet.Servlet.service(javax.servlet.ServletRequest,javax.servlet.ServletResponse)
method. There's no need to override this method.- Parameters:
req
the
object that contains the request the client made of the servletHttpServletRequest
resp
the
object that contains the response the servlet returns to the clientHttpServletResponse
- Throws:
java.io.IOException
if an input or output error occurs while the servlet is handling the HTTP requestjavax.servlet.ServletException
if the HTTP request cannot be handled- See also:
javax.servlet.Servlet.service(javax.servlet.ServletRequest,javax.servlet.ServletResponse)
//유저가 보낸 요청 메서드는 무엇이냐? get?post?
//getLastModified가 뭐였지? part1에 있던건가.. part1에서 잘라왔음.
/*
<div class="line" id="line-245" style="font-family: 'Lucida Grande', Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: -2px 0px 0px; padding: 0px 0px 0px 10px; color: rgb(68, 29, 42); white-space: normal;"><div class="lnml" id="lnml-245" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px; display: inline;"></div><div class="ln" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px 6px; display: inline;">245</div><div class="lnmr" id="lnmr-245" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px; display: inline;"></div><pre style="margin-top: 0px; margin-bottom: 0px; display: inline;"> protected long getLastModified(HttpServletRequest req) {</pre></div><div class="line" id="line-246" style="font-family: 'Lucida Grande', Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: -2px 0px 0px; padding: 0px 0px 0px 10px; color: rgb(68, 29, 42); white-space: normal;"><div class="lnml" id="lnml-246" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px; display: inline;"></div><div class="ln" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px 6px; display: inline;">246</div><div class="lnmr" id="lnmr-246" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px; display: inline;"></div><pre style="margin-top: 0px; margin-bottom: 0px; display: inline;"> return -1;</pre></div><div class="line" id="line-247" style="font-family: 'Lucida Grande', Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: -2px 0px 0px; padding: 0px 0px 0px 10px; color: rgb(68, 29, 42); white-space: normal;"><div class="lnml" id="lnml-247" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px; display: inline;"></div><div class="ln" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px 6px; display: inline;">247</div><div class="lnmr" id="lnmr-247" style="font-family: 돋움, dotum, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: 0px; padding: 0px; display: inline;"></div><pre style="margin-top: 0px; margin-bottom: 0px; display: inline;"> }
</pre></div><div class="line" id="line-247" style="font-family: 'Lucida Grande', Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; list-style: none; margin: -2px 0px 0px; padding: 0px 0px 0px 10px; color: rgb(68, 29, 42); white-space: normal;"><pre style="margin-top: 0px; margin-bottom: 0px; display: inline;">*/</pre></div>
//수정된 서블릿은 부가적 작업을 건너뛰네?
//어떤 경우에 일로 빠지는 거지? (maybeSetlastModified()가 변경하는건가?)
//나머진 내일 분석!!!!!
Dispatches client requests to the protected
service
method. There's no need to override this method.- Parameters:
req
the
object that contains the request the client made of the servletHttpServletRequest
res
the
object that contains the response the servlet returns to the clientHttpServletResponse
- Throws:
java.io.IOException
if an input or output error occurs while the servlet is handling the HTTP requestjavax.servlet.ServletException
if the HTTP request cannot be handled- See also:
javax.servlet.Servlet.service(javax.servlet.ServletRequest,javax.servlet.ServletResponse)
'프로그래밍 > JSP' 카테고리의 다른 글
jsp에서 빈의 사용3 (0) | 2014.01.01 |
---|---|
jsp에서 빈의 사용2 (0) | 2014.01.01 |
빈을 이용한 컴포넌트 방식의 설계1 (0) | 2014.01.01 |
jsp 스크립트 (0) | 2014.01.01 |
javax.servlet.http.HttpServlet 소스코드 part1 (2013/11/27) (0) | 2014.01.01 |
RECENT COMMENT