<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>

<%@ page isELIgnored="false"%>
<%//무시하겠다. %>
<%  request.setCharacterEncoding("EUC-KR"); %>

<p>수식계산하기</p>
\${2+5}=${2+5}<br/>
계산=${2+5}<br/>
<p>헤더정보 얻기</p>
웹브라우저${header["user-agent"]}<br/>
사용자컴퓨터${header["host"]}<br/>

<p> 파라메터값 얻기 </p>
name : ${param["name"]}<br/>
name값 공백 여부 ${empty param["name"]}<br/> 

<p>세션&쿠키값 얻기</p>
세션ID : ${cookie["JSESSIONID"].value}<br/>

-- http://localhost/myapp/EL/hello_el.jsp?name=aaa
-- 결과 사진

 

----- JSTL

--- jar 파일을 톰캣의 저장 요청및 응답

jstl.jar

standard.jar



<%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@taglib prefix="sql" uri="http://java.sun.com/jstl/sql"%>
<%@taglib prefix="xml" uri="http://java.sun.com/jstl/xml"%> 


--- 파일

contact3.html

contact3.jsp

contact4.html


-- 결과





----- iftag 

<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html><Head><Title>ggg</Title></Head> 
<body>
<center>
<c:if test="${!empty param.name }">
이름 :${param.name} 
</c:if>
</center>
</body>
</html>

-- 후에 
http://localhost/myapp/EL/iftag.jsp?name=aaa 수정
 
-- 사진






 














+ Recent posts