본문 바로가기
국비교육

국비교육 56일차

by Diligejy 2019. 2. 22.

1.

파일 업로드는 url경로를 따라가지 않는 실제 폴더에 하는 것이 좋다.


2.

1.servlet(페이지 url요청 설정태그) = page, request 객체 2.session 3.config에 대한 설정파일 


3.

Context = Application -> context.xml 

|        ----- Config

Session

|

Request

|

PageContext



Session, Request, PageContext -> web.xml


4.

web.xml에서 load-on-startup 


5.


6.

JSP에서 업로드 할 때는 주로 Post방식 form-data = Post

다운로드 할 때는 get방식


7.

factory : 항상 뭔가 통합적으로 담은것으로 이해할 것


8.

EL 사용법


$는 출력문이다.


내장객체 : Context, Session, Request, pageContext

<br> 1. pageContext에서 url로 요청하게 되면 발생하는 header 정보

<br> ${header["user-agent"]}

<br> ${header["cookie"]}

<br> ${header["host"]}

<br> ${header.host}

<br> 2. pageContext = 

<%=pageContext.getRequest()%>

<br> 3. HttpSevletRequest = requestScope(EL)

<br> 4. HttpSession = sessionScope(EL)

<br> 5. ServletContext(servlet) = application(jsp) = applicationScope(EL)

<br> 6. request.getParameter('name'); = param['name']

<br> 7. request.getParameterValues(); = paramValues

<br> 8. request.getCookies() = getCookies

<br> 9. initParameter('name') = initParam['name'];


9.


1)


2)


10.

11.

정리

context --- application

|    ------------> config(server.xml, context.xml, web.xml)

HttpSession      ----- session

HttpServletRequest --- request

HttpServlet    -------- pageContext


12.


'국비교육' 카테고리의 다른 글

국비교육 58일차  (0) 2019.02.26
국비교육 57일차  (0) 2019.02.25
국비교육 55일차  (0) 2019.02.21
국비교육 54일차  (0) 2019.02.20
국비교육 53일차  (0) 2019.02.19

댓글