:::내장객체:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
P137
***FequestExample1.html
-
Request Example1
***FequestExample1.jsp
Request Example1 <%@ page contentType= ext/html;charset=EUC-KR\%> <% request.setCharacterEncoding(euc-kr); %> <% String name = request.getParameter(
ame); String studentNum = request.getParameter(studentNum); String sex = request.getParameter(sex); String major = request.getParameter(major);
if(sex.equals(man)){ sex = 남자; }else{ sex = 여자; } %>
성명 : <%=name%>
학번 : <%=studentNum%>
성별 : <%=sex%>
학과 : <%=major%>
-----------------------------
P139
--------------------------------
P141
***ResponseExample1.jsp
Response Example1 <% response.sendRedirect(ResponseExample1_1.jsp); %>
***ResponseExample1_1.jsp
<%@ page contentType= ext/html;charset=EUC-KR\%> <% response.setHeader(Pragma,
o-cache); if(request.getProtocol().equals(HTTP/1.1)){ response.setHeader(Cache-Control,
o-cache); } %>
Response Example1 http://localhost:8080/myapp/ch06/ResponseExample1.jsp가
http://localhost:8080/myapp/ch06/ResponseExample1_1.jsp로 변경이 되었습니다.
------------------------------------------- P143 ***OutExample1.jsp <%@ page contentType= ext/html;charset=EUC-KR buffer=5kb %> <% int totalBuffer = out.getBufferSize(); int remainBuffer = out.getRemaining(); int useBuffer = totalBuffer - remainBuffer; %>
Out Example1 현재 페이지의 Buffer 상태
출력 Buffer의 전체 크기 : <%=totalBuffer%>byte
남은 Buffer의 크기 : <%=remainBuffer%>byte
현재 Buffer의 사용량 : <%=useBuffer%>byte
-------------------------------------------
:::JSP 실습하기::::::::::::::::::::::::::::::::: ---OutExample1.jsp------------------------------ <%@page contentType= ext/html;charset=EUC-KR buffer=5kb %> <% int totalBuffer=out.getBufferSize(); int remainBuffer=out.getRemaining(); int useBuffer=totalBuffer-remainBuffer; %>
Out Example1 현대패이지의 buffer상태
출력 Buffer의 전테크기:<%=totalBuffer%>byte
남은 Buffer의 크기:<%=remainBuffer%>byte
현재 Buffer의 사용량:<%=useBuffer%>byte
---ResponseExample1_1.jsp----------------------------------
ResponseExample1 <% response.sendRedirect(ResponseExample1_1.jsp); %> --- <%@page contentType= ext/html;charset=EUC-KR\%> <% response.setHeader(Pragma,
o-cache); if(request.getProtocol().equals(HTTP/1.1.)){ response.setHeader(Cache-Control,
o-cache); } %>
ResponseExample1 http://localhost:8080/ch06/ResponseExample1.jsp가
http://localhost:8080/ch06/ResponseExample1_1.jsp로 변경되어습니다.
------------------------------------------------------
:::MySQL 드라이버 설정및 세팅하기::::::::::::::::: 연결사이트- http://www.mysql.com 다운로드경로순서 - http://www.mysql.com메인화면 하단위치Download - Application programming Interfaces(APIs) +Official APIs: +MySQL Connector/j +MySQL Connector/J3.0--production release -메인화면 아래쪽:Source and Binaries (zip) 3.0.16-ga 1.2M Pick a mirror -태극기아이콘첫번째 South Korea [New21 Community] HTTP 클릭하고 지정된파일에 저장하세요 1)mysql-connector-java-3.0.16-ga.zip압축을 풀고 (D:\교육\jsp\mysql-connector-java-3.0.16-ga) 2)mysql-connector-java-3.0.16-ga-bin.jar을 복사하여 아래 해당파일에 붙혀넣기를 하세요. 3)C:\j2sdk1.4.2_03\jre\lib\ext 4)C:\Program Files\Apache Group\Tomcat 4.1\common\lib
JSP스터디 2004 11 25
소스자세히보기: http://www.6VJ.com/jsp/jsp1125.txt
http://www.6VJ.com/jsp/jsp1125.html
http://www.6VJ.com/jsp/jsp11256.html
|