cf.
JSP 2.0 †
JSP¤Î¹½Â¤ †
¥Æ¥ó¥×¥ì¡¼¥È¥Æ¥¥¹¥È †
- HTML / XML
- ¥³¥á¥ó¥È¤Î°ã¤¤¤ËÃí°Õ
<!-- XML¤Î¥³¥á¥ó¥È -->
<%-- JSP¤Î¥³¥á¥ó¥È -->
<%// JSP¤Î¥³¥á¥ó¥È(°ú¤Ã¤«¤±ÌäÂê) %>
¥Ç¥£¥ì¥¯¥Æ¥£¥Ö †
- ½ñ¼°
- ¥¹¥Ú¡¼¥¹¶èÀÚ¤ê¤ÇÊ£¿ô¤Î°À¤òµ½Ò¤·¤Æ¤â¤è¤¤¤·
<%@ page buffer="128kb" autoFlash="false" %>
- Ê̤Îpage¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤Ë¤·¤Æ¤â¤è¤¤
<%@ page buffer="128kb" %>
<%@ page autoFlash="false" %>
- 13¼ïÎà
- JSP¥·¥ó¥¿¥Ã¥¯¥¹(ÀßÄêÃͤϥǥե©¥ë¥ÈÃÍ)
<%@ page language="java" %>
<%--
<%@ page extends="" %>
--%>
<%@ page import="java.lang.*,javax.servlet.*,javax.servlet.http.*,javax.servlet.jsp.*" %>
<%@ page session="true" %>
<%@ page buffer="8kb" %>
<%@ page autoFlash="true" %>
<%@ page isThreadSafe="true" %>
<%--
<%@ page info="" %>
--%>
<%@ page isErrorPage="false" %>
<%--
<%@ page errorPage="" %>
--%>
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<%--
<%@ page pageEncoding="contentType¤Îcharset" %>
--%>
<%@ page isELIgnored="false" %>
- XML¥·¥ó¥¿¥Ã¥¯¥¹
<jsp:directive.page language="java" />
<!--
<jsp:directive.page extends="" />
-->
<jsp:directive.page import="java.lang.*,javax.servlet.*,javax.servlet.http.*,javax.servlet.jsp.*" />
<jsp:directive.page session="true" />
<jsp:directive.page buffer="8kb" />
<jsp:directive.page autoFlash="true" />
<jsp:directive.page isThreadSafe="true" />
<!--
<jsp:directive.page info="" />
-->
<jsp:directive.page isErrorPage="false" />
<!--
<jsp:directive.page errorPage="" />
-->
<jsp:directive.page contentType="text/html;charset=ISO-8859-1" />
<!--
<jsp:directive.page pageEncoding="contentType¤Îcharset" />
-->
<jsp:directive.page isELIgnored="false" />
- °À¤Î³µÎ¬
°À | ³µÎ¬ |
language | JSP2.0¤Ç¤Ï"java"¤Î¤ß |
extends | ¤³¤ÎJSP¤«¤éServlet¤ò¥×¥ê¥³¥ó¥Ñ¥¤¥ë¤¹¤ëºÝ¤Ë·Ñ¾µ¤¹¤ë¥¯¥é¥¹ |
import | ¤³¤ÎJSP¤Ç»È¤¦¥¯¥é¥¹¡£¥Ç¥Õ¥©¥ë¥È¤Çimport¤µ¤ì¤Æ¤¤¤ë°Ê³°¤Î¥¯¥é¥¹¤ò»È¤¦¤È¤¤Ë¤Ï ¡<%@ page import="¡Á"%> ¤Ë¥«¥ó¥Þ¶èÀÚ¤ê¤Çµ½Ò¤¹¤ë¤«¡¢¢<%@ page import="¡Á"%> ¤òÊ£¿ôµ½Ò¤¹¤ë |
session | °ÅÌÛ¥ª¥Ö¥¸¥§¥¯¥È session ¤ò»È¤¨¤ë¤è¤¦¤Ë¤¹¤ë |
buffer,autoFlash | HTML¤ò½ÐÎϤ¹¤ëºÝ¤Î¥Ð¥Ã¥Õ¥¡¥µ¥¤¥º¡£autoFlash="false"¤Ë¤¹¤ë¤È¡¢¥Ð¥Ã¥Õ¥¡¤«¤é¤¢¤Õ¤ì¤¿¤È¤ ServletException? ¤òµ¯¤³¤¹ |
isThreadSafe? | true¸ÇÄê¿ä¾©¡£¤³¤ÎJSP¤Ï¥¹¥ì¥Ã¥É¥»¡¼¥Õ¤Ëºî¤é¤ì¤Æ¤¤¤ë¤«¡© |
info | "Copyright (C) 1995-2006 KAGYUU CORPORATION, All Rights Reserved." ¤Ê¤É |
isErrorPage? | °ÅÌÛ¥ª¥Ö¥¸¥§¥¯¥È exception ¤ò»È¤¨¤ë¤è¤¦¤Ë¤¹¤ë |
errorPage | ¤³¤ÎJSP¤ÇÎ㳰ȯÀ¸»þ¤ËÁ«°Ü¤¹¤ëJSP¡£Á«°ÜÀè¤ÎJSP¤Ç¤Ï°ÅÌÛ¥ª¥Ö¥¸¥§¥¯¥È exception ¤ÇȯÀ¸¤·¤¿Îã³°¤ò»²¾È²Äǽ |
contentType | "text/html;charset=Windows31-J"¤Ê¤É |
pageEncoding | "Windows31-J"¤Ê¤É |
isELIgnored | EL¼°¤ò̵»ë¤¹¤ë¤«¡© |
- JSP¤«¤éServlet¤Ø¤Î¥×¥ê¥³¥ó¥Ñ¥¤¥ë»þ¤ËÀÅŪ¤Ë¼è¤ê¹þ¤Þ¤ì¤ë»ñ»º
(¤Ä¤Þ¤ê¤Ï¡¢Servlet¤ÎJava¥³¡¼¥É¤Ë¼è¤ê¹þ¤Þ¤ì¤ë)
- ɸ½à¥¢¥¯¥·¥ç¥ó <jsp:include> ¤È¤Î°ã¤¤¤ËÃí°Õ
- JSP¥·¥ó¥¿¥Ã¥¯¥¹
<%@ include file="¥Ñ¥¹" %>
- ¥Ñ¥¹£±¡§JSP¤«¤é¤ÎÁêÂХѥ¹
- ¥Ñ¥¹£²¡§ContextRoot?¤«¤é¤ÎÀäÂХѥ¹
- ÉÔ²Ä
- XML¥·¥ó¥¿¥Ã¥¯¥¹
<jsp.directive.include file="¥Ñ¥¹" />
- tagÄêµÁ
- JSP¥·¥ó¥¿¥Ã¥¯¥¹
- ¥¿¥°¥Ï¥ó¥É¥é
<%@ taglib uri="TLD¥Õ¥¡¥¤¥ë¤ÎURI" prefix="JSPÆâ¤Ç»È¤ï¤ì¤ë¥¿¥°Ì¾" %>
- ¥¿¥°¥Õ¥¡¥¤¥ë
<%@ taglib tagdir="/WEB-INF/tags" prefix="JSPÆâ¤Ç»È¤ï¤ì¤ë¥¿¥°Ì¾" %>
- XML¥·¥ó¥¿¥Ã¥¯¥¹
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:${JSPÆâ¤Ç»È¤ï¤ì¤ë¥¿¥°Ì¾}="${URI}"
version="2.0>
</jsp:root>
¥¹¥¯¥ê¥×¥Æ¥£¥ó¥° †
¥¹¥¯¥ê¥×¥È¥ì¥Ã¥È †
- JSP¥·¥ó¥¿¥Ã¥¯¥¹
<% Java¥³¡¼¥É %>
- XML¥·¥ó¥¿¥Ã¥¯¥¹
<jsp:scriptlet>Java¥³¡¼¥É</jsp:scriptlet>
Àë¸À †
- JSP¤«¤é¥×¥ê¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤¿Servlet¤Î¥Õ¥£¡¼¥ë¥ÉÊÑ¿ô¡¢¥á¥½¥Ã¥ÉÀë¸À¡£
- JSP¥·¥ó¥¿¥Ã¥¯¥¹
<%! int count; %>
<%! int sum(int a,int b){
return a+b;
}
%>
- XML¥·¥ó¥¿¥Ã¥¯¥¹
<jsp:declarations> ¥Õ¥©¡¼¥ë¥ÉÊÑ¿ôÀë¸À¡¦¥á¥½¥Ã¥ÉÀë¸À </jsp:declarations>
JSP¼° †
- ¼°¤ÎËöÈø¤Ë ; ¤¬ÉÕ¤«¤Ê¤¤¤³¤È¤ËÃí°Õ
- JSP¥·¥ó¥¿¥Ã¥¯¥¹
<%= count %>
- XML¥·¥ó¥¿¥Ã¥¯¥¹
<jsp:expression> count </jsp:expression>
EL¼° †
- µ½ÒÊýË¡
${¼°}
- EL¼°¤ò»È¤¨¤ë¤È¤³¤í¤È»È¤¨¤Ê¤¤¤È¤³¤í
¾ì½ê | Îã |
EL¼°¤ò»È¤¨¤ë¤È¤³¤í |
¥Æ¥ó¥×¥ì¡¼¥È¥Æ¥¥¹¥È¡£ | <FONT COLOR="RED">ËÜÆü${count}¿ÍÌܤΤªµÒÍÍ</FONT> |
¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤Î°ÀÃÍ | <%@ page pageEncoding="${charset}" %> |
¥¢¥¯¥·¥ç¥ó(¥¿¥°)¤Î°ÀÃÍ | <snail:code value="${code}"/> |
EL¼°¤ò»È¤¨¤Ê¤¤¤È¤³¤í |
¥¹¥¯¥ê¥×¥È¥ì¥Ã¥È | <% if(a=${count}){ |
Àë¸À | <%! int flag = ${count>10}; %> |
JSP¼° | <%= ${count} %> |
- °ÅÌÛ¥ª¥Ö¥¸¥§¥¯¥È
- ¤³¤ÎJSP¤Î¥½¡¼¥¹¤Ï¡¢ElObjectExam.jsp
- ¤³¤Î¤Û¤«¤Ë pageContext ¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ë¡£¤³¤Î¥ª¥Ö¥¸¥§¥¯¥È¤ÎÇÛ²¼¤Ë¡¢JSP¤Î°ÅÌÛ¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ë¡¦¡¦¡¦¤Ï¤º¤À¤¬¡¢Tomcat5.5.17¤Ç¤Ï¾å¼ê¤¯Æ°¤«¤Ê¤«¤Ã¤¿¡£°ì±þ¥Æ¥¹¥È¤Ë½Ð¤ë¤Î¤Ç¤Þ¤È¤á¤Æ¤ª¤¯¤È
- ${pageContext.page.???}
- ${pageContext.request.???}
- ${pageContext.session.???}
- ${pageContext.application.???}
- ${pageContext.response.???}
- ${pageContext.exception.???}
- ${pageContext.out.???}
- ${pageContext.config.???}
- ±é»»»Ò
- ͽÌó¸ì(ÊÑ¿ô̾¤È¤·¤Æ»È¤¨¤Ê¤¤Êª) 16¸Ä
1.div 2.mod
3.eq 4.ne 5.lt 6.gt 7.le 8.ge
9.and 10.or 11.not
12.true 13.false
14.null 15.emoty 16.instanceof
- ¥Õ¥¡¥ó¥¯¥·¥ç¥ó
- EL¼°¤«¤éJava¥¯¥é¥¹¤Î¥á¥½¥Ã¥É¤ò»È¤¦¤³¤È¤¬½ÐÍè¤ë
package com.snail.sjcwc;
public final class ELFunctionExam {
public static int sum(final int a,final int b){
return a+b;
}
public static java.lang.String cat(final java.lang.String a,final java.lang.String b) {
return a + b;
}
}
- public static ¤ÇÄêµÁ¤¹¤ë
- package ɬ¿Ü¡£¥Ç¥Õ¥©¥ë¥È¥Ñ¥Ã¥±¡¼¥¸¤Ï¥À¥á
- tld¥Õ¥¡¥¤¥ë¤ËÄêµÁ (Java SJC-WC tld#function)
<?xml version="1.0" encoding="UTF-8"?>
<taglib
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">
<tlib-version>2.0</tlib-version>
<short-name>FunctionExample</short-name>
<function>
<name>sum</name>
<function-class>com.snail.sjcwc.ELFunctionExam</function-class>
<function-signature>
int sum(int,int)
</function-signature>
</function>
<function>
<name>cat</name>
<function-class>com.snail.sjcwc.ELFunctionExam</function-class>
<function-signature>
java.lang.String cat(java.lang.String,java.lang.String)
</function-signature>
</function>
</taglib>
- <function-singature> ¤Ç¤Ï¡¢ÊÖÃÍ¡¦°ú¿ô¤Ï´°Á´½¤¾þ̾¤Çµ½Ò¤¹¤ë
- JSP¤Ç¤Ï¡¢tld¤ÇÄêµÁ¤·¤¿Ì¾Á°¤Ç»È¤¦
<%@ page contentType="text/html;charset=Windows-31J" %>
<%@ taglib uri="/WEB-INF/func.tld" prefix="myFunc" %>
<head>
<title>EL Function Example</title>
</head>
<body>
<table border="1">
<tr><td>SUM</td><td>${myFunc:sum(1,2)}</td></tr>
<tr><td>CAT</td><td>${myFunc:cat("¤Í¤³","¤Í¤³¤í¤ó¤À")}</td></tr>
</table>
</body>
</head>
- ¼Â¹Ô·ë²Ì
¥¯¥é¥·¥Ã¥¯¥¿¥°¥Ï¥ó¥É¥é †
- ²òÀÏÂоݤÎJSP
¡¥¿¥°É¾²ÁÁ°¤ÎJSP
<my:exTag attr="3"> <%-- ³«»Ï¥¿¥°¤ò¢¡¢Â°À¤ò£¤È¸Æ¤Ö¤³¤È¤Ë¤¹¤ë --%>
¤BODY
</my:exTag> <%-- ½ªÎ»¥¿¥°¤ò¥¤È¤¹¤ë --%>
¦»Ä¤ê¤ÎJSP
- ¥¿¥°¤Ë¤è¤ëJSP½èÍý¥Õ¥í¡¼
- ¤Þ¤º¤Ï°À¤òÆɤ߼è¤ë¤À¤±¤Î¥¿¥°¥Ï¥ó¥É¥é
- JSP(TagAttribute)
- ¥¿¥°¥Ï¥ó¥É¥é(TagAttribute)
- TLD(tag.tld)
- ¥¹¥¯¥ê¥×¥Æ¥£¥ó¥°ÊÑ¿ô¤È EVAL_BODY_AGAIN »È¤¦¥¿¥°¥Ï¥ó¥É¥é
- JSP(TagIteration)
- ¥¿¥°¥Ï¥ó¥É¥é(TagIteration)
- TLD(tag.tld)
- ¥¿¥°¥Ü¥Ç¥£¤ÎÆɤ߼è¤ê
- java.servlet.jsp.tagext.BodyContent? extends JSPWriter
¥á¥½¥Ã¥É | µ¡Ç½ |
void | cleanBody() | Body¤ò¥¯¥ê¥¢ |
JSPWriter | getEnclosingWriter?() | JSPWriter¤ò¼èÆÀ |
Reader | getReader() | Body¤ÎÆâÍƤò½ÐÎϤ¹¤ëReader¤ò¼èÆÀ |
String | getString() | Body¤ÎÆâÍƤòString¤È¤·¤Æ¼èÆÀ |
void | writeOut(Write out) | out¤Ë¡¢Body¤ÎÆâÍƤò½ÐÎÏ |
- doAfterBody?() ¤Ç¡¢pageContext.getOut():JSPWriter ¤Ë½ñ¤¹þ¤ó¤ÀÆâÍƤϡ¢HTML¤Ç¤Ï¤Ê¤¯ bodyContent ¤Ë³ÊǼ¤µ¤ì¤ë¤è¤¦¤À
- [[The tag body is " ¤¢¤¤¤¦¤¨¤ª ".]] ¤ÎÉôʬ
- doEndTag?() ¤Ç¡¢pageContext.getOut():JSPWriter ¤Ë½ñ¤¹þ¤ó¤ÀÆâÍƤϡ¢HTML¤Ë½ÐÎϤµ¤ì¤ë
- ¥¿¥°¥Ü¥Ç¥£¤Ï¡Ö ¤¢¤¤¤¦¤¨¤ª [[The tag body is " ¤¢¤¤¤¦¤¨¤ª ".]]¡×¤Ç¤·¤¿ ¤ÎÉôʬ
- JSP(TagBody)
- ¥¿¥°¥Ï¥ó¥É¥é(TagBody)
- TLD(tag.tld)
- JSP¥Õ¥é¥°¥á¥ó¥È
- JSP(JSPFragment#jsp)
- ¥¿¥°¥Ï¥ó¥É¥é(JSPFragment#java)
public class FragmentExam extends BodyTagSupport {
private JspFragment attr = null;
public void setAttr(JspFragment param) { attr = param; }
public JspFragment getAttr() { return attr; }
public int doStartTag() throws JspException {
// JspFragment#invoke(Write out)¤Ç¡¢HTML¤ËJSP¥Õ¥é¥°¥á¥ó¥È
// ¤ò½ÐÎÏ¡£²¿²ó¤Ç¤â¸Æ¤Ó½Ð¤»¤ë
getAttr().invoke(getAttr().getJspContext().getOut());
// null ¤ò»ØÄꤷ¤Æ¤â¾åµ¤ÈƱ¤¸
getAttr().invoke(null);
return EVAL_BODY_BUFFERED;
}
¡Ä
- ¥¿¥°¥Ï¥ó¥É¥é¤Î¥Õ¥£¡¼¥ë¥É¤Ë JspFragment? ·¿¤ÎÊÑ¿ô¤òÍÑ°Õ¤¹¤ë(¤³¤³¤Ë¥¿¥°Â°À¤¬³ÊǼ¤µ¤ì¤ë)
- JspFragment? ¤ò HTML ¤Ë½ÐÎϤ¹¤ë¤È¤¤Ë¤Ï invoke() ¥á¥½¥Ã¥É¤ò»È¤¦¡£
- TLD(tag.tld)
- ¿Æ¥¿¥°¤ÎÆɤ߼è¤ê
- JSP(ParentTag)
- ¥¿¥°¥Ï¥ó¥É¥é(ParentTag)
- TLD(tag.tld)
¥·¥ó¥×¥ë¥¿¥°¥Ï¥ó¥É¥é †
¥¿¥°¥Õ¥¡¥¤¥ë †
- ¥¿¥°¤òJSP¤ÈƱ¤¸¹½Ê¸¤Î¥¿¥°¥Õ¥¡¥¤¥ë¤ÇÄêµÁ¤¹¤ë¤³¤È¤â½ÐÍè¤ë
- ÀßÃÖ¾ì½ê
- [Context Root]-[WEB-INF]-[tags] °Ê²¼(¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤â²Ä¤Ê¤³¤È¤ËÃí°Õ)
- [Context Root]-[lib] ¤Ë³ÊǼ¤µ¤ì¤Æ¤¤¤ë JAR¥Õ¥¡¥¤¥ë¤Î [META-INF]-[tags] °Ê²¼(¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤â²Ä¤Ê¤³¤È¤ËÃí°Õ)
- ³ÈÄ¥»Ò¤Ï .tag ¤Þ¤¿¤Ï .tagx
- ¼ÂÁõÎã
- ¥¿¥°BODY¤ÎÆâÍƤˤĤ¤¤Æ¡¢¥¿¥°Â°Àfrom¤òto¤ËÁ´ÃÖ´¹¤¹¤ë¥¢¥¯¥·¥ç¥ó¤ò¥¿¥°¥Õ¥¡¥¤¥ë¤Ç¼ÂÁõ
- tfExam.jsp
<%@ page contentType="text/html;charset=Windows-31J" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="myTF" %>
<html>
<head>
<title>Tag File Example</title>
</head>
<body>
BEFORE TAG
<hr/>
<myTF:tfExam from="¥É¥Ê" to="DONA">
¤¢¤ëÀ²¤ì¤¿¡¡Ã뤵¤¬¤ê<br/>
»Ô¾ì¤Ø¡¡¤Ä¤Å¤¯Æ»<br/>
²ÙÇϼ֤¬¡¡¥´¥È¥´¥È<br/>
»Òµí¤ò¡¡¾è¤»¤Æ¤æ¤¯<br/>
²¿¤âÃΤé¤Ê¤¤¡¡»Òµí¤µ¤¨<br/>
Çä¤é¤ì¤Æ¤æ¤¯¤Î¤¬<br/>
¤ï¤«¤ë¤Î¤À¤í¤¦¤«<br/>
¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê<br/>
Èᤷ¤ß¤ò¤¿¤¿¤¨<br/>
¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê<br/>
¤Ï¤«¤Ê¤¤Ì¿<br/>
</myTF:tfExam>
<hr/>
AFTER TAG
</body>
</html>
- tfExam.tag
<%@ tag body-content="scriptless" %>
<%@ attribute name="from" required="true" fragment="false"%>
<%@ attribute name="to" required="true" fragment="false"%>
<jsp:doBody var="bodyString" scope="request"/>
<%= ((String)request.getAttribute("bodyString")).replaceAll(from,to) %>
- tag¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¡¢attribute¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤Ç¡¢tld¥Õ¥¡¥¤¥ë¤ËÄêµÁ¤·¤¿ÆâÍƤòÄêµÁ
- ¥¿¥°BODY¤Ï¡¢<jsp:dobody>¥¿¥°¤Ç¥¹¥³¡¼¥×¤Ë³ÊǼ¤¹¤ë
- ¥¿¥°Â°À¤Ï¡¢¤³¤Î¥¿¥°¥Õ¥¡¥¤¥ë¤«¤é¥×¥ê¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤¿Java¥¯¥é¥¹(¥¿¥°¥¯¥é¥¹¡Ë¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤Ë³ÊǼ¤µ¤ì¤ë
- ¼ÂÁõÎã(JSP¥Õ¥é¥°¥á¥ó¥ÈÈÇ)
- tfExam2.jsp
<%@ page contentType="text/html;charset=Windows-31J" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="myTF" %>
<html>
<head>
<title>Tag File Example</title>
</head>
<body>
BEFORE TAG
<hr/>
<myTF:tfExam2>
<jsp:attribute name="from">¥É¥Ê</jsp:attribute>
<jsp:attribute name="to">DONA</jsp:attribute>
<jsp:body>
¤¢¤ëÀ²¤ì¤¿¡¡Ã뤵¤¬¤ê<br/>
»Ô¾ì¤Ø¡¡¤Ä¤Å¤¯Æ»<br/>
²ÙÇϼ֤¬¡¡¥´¥È¥´¥È<br/>
»Òµí¤ò¡¡¾è¤»¤Æ¤æ¤¯<br/>
²¿¤âÃΤé¤Ê¤¤¡¡»Òµí¤µ¤¨<br/>
Çä¤é¤ì¤Æ¤æ¤¯¤Î¤¬<br/>
¤ï¤«¤ë¤Î¤À¤í¤¦¤«<br/>
¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê<br/>
Èᤷ¤ß¤ò¤¿¤¿¤¨<br/>
¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê¡¡¥É¥Ê<br/>
¤Ï¤«¤Ê¤¤Ì¿<br/>
</jsp:body>
</myTF:tfExam2>
<hr/>
AFTER TAG
</body>
</html>
- tfExam2.tag
<%@ tag body-content="scriptless" %>
<%@ attribute name="from" required="true" fragment="true" %>
<%@ attribute name="to" required="true" fragment="true" %>
<jsp:doBody var="bodyKey" scope="request"/>
<jsp:invoke fragment="from" var="fromKey" scope="request"/>
<jsp:invoke fragment="to" var="toKey" scope="request"/>
<%
String bodyValue = (String)request.getAttribute("bodyKey");
String fromValue = (String)request.getAttribute("fromKey");
String toValue = (String)request.getAttribute("toKey");
%>
<%= bodyValue.replaceAll(fromValue,toValue) %>
- JSP¥Õ¥é¥°¥á¥ó¥È(¥¿¥°Â°À)¤Ï¡¢<jsp:invoke>¥¿¥°¤Ç¥¹¥³¡¼¥×¤Ë³ÊǼ¤¹¤ë
- ¥¿¥°¥Õ¥¡¥¤¥ë¤Ç»È¤ï¤ì¤ë¥¢¥¯¥·¥ç¥ó¤ÎÀ°Íý
- <jsp:dobody>
°À | ÀâÌÀ | ÃÍ(¡û¥Ç¥Õ¥©¥ë¥ÈÃÍ) |
scope | ¥¿¥°BODY¤ÎÆâÍƤò¤É¤Î¥¹¥³¡¼¥×¤Ë³ÊǼ¤¹¤ë¤«? | ¡ûpage, request, session, application |
var | ¥¿¥°BODY¤ÎÆâÍƤòString·¿¤Ç³ÊǼ¤¹¤ë¾ì¹ç¤Î¥¡¼ÃÍ | |
varReader | ¥¿¥°BODY¤ÎÆâÍƤòReader·¿¤Ç³ÊǼ¤¹¤ë¾ì¹ç¤Î¥¡¼ÃÍ | |
- <jsp:invoke>
°À | ÀâÌÀ | ÃÍ(¡û¥Ç¥Õ¥©¥ë¥ÈÃÍ) |
scope | ¥¿¥°Â°À¤ÎÆâÍƤò¤É¤Î¥¹¥³¡¼¥×¤Ë³ÊǼ¤¹¤ë¤«? | ¡ûpage, request, session, application |
fragment | ¥¿¥°Â°À̾(JSP¥Õ¥é¥°¥á¥ó¥È̾) | |
var | ¥¿¥°Â°À¤ÎÆâÍƤòString·¿¤Ç³ÊǼ¤¹¤ë¾ì¹ç¤Î¥¡¼ÃÍ | |
varReader | ¥¿¥°Â°À¤ÎÆâÍƤòReader·¿¤Ç³ÊǼ¤¹¤ë¾ì¹ç¤Î¥¡¼ÃÍ | |
- ¥¿¥°¥Õ¥¡¥¤¥ë¤Ç»È¤ï¤ì¤ë¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤ÎÀ°Íý
- tag¥Ç¥£¥ì¥¯¥Æ¥£¥Ö
JSP¥·¥ó¥¿¥Ã¥¯¥¹ | XML¥·¥ó¥¿¥Ã¥¯¥¹ |
<%@ tag display-name="" %> | <jsp.directive.tag display-name="" > |
<%@ tag body-content="" %> | <jsp.directive.tag body-content="" > |
<%@ tag dynamic-attributes="true/false" %> | <jsp.directive.tag dynamic-attributes="" > |
<%@ tag small-icon="" %> | <jsp.directive.tag small-icon="" > |
<%@ tag large-icon="" %> | <jsp.directive.tag large-icon="" > |
<%@ tag description="" %> | <jsp.directive.tag description="" > |
<%@ tag example="" %> | <jsp.directive.tag example="" > |
<%@ tag language="java" %> | <jsp.directive.tag language="" > |
<%@ tag import="" %> | <jsp.directive.tag import="" > |
<%@ tag pageEncoding="" %> | <jsp.directive.tag pageEncoding="" > |
<%@ tag isELIgnored="true/false" %> | <jsp.directive.tag isELIgnored="" > |
- attribute¥Ç¥£¥ì¥¯¥Æ¥£¥Ö
JSP¥·¥ó¥¿¥Ã¥¯¥¹ | XML¥·¥ó¥¿¥Ã¥¯¥¹ |
<%@ tag name="" %> | <jsp.directive.tag name="" > |
<%@ tag requreid="true/false" %> | <jsp.directive.tag requreid="" > |
<%@ tag fragment="true/false" %> | <jsp.directive.tag fragment="" > |
<%@ tag rtexprvalue="true/false" %> | <jsp.directive.tag rtexprvalue="" > |
<%@ tag type="java.lang.String" %> | <jsp.directive.tag type="" > |
<%@ tag description="" %> | <jsp.directive.tag description="" > |
- variable¥Ç¥£¥ì¥¯¥Æ¥£¥Ö
JSP¥·¥ó¥¿¥Ã¥¯¥¹ | XML¥·¥ó¥¿¥Ã¥¯¥¹ |
<%@ tag name-given="" %> | <jsp.directive.tag ="" > |
<%@ tag name-from-attribute="" %> | <jsp.directive.tag ="" > |
<%@ tag alias="" %> | <jsp.directive.tag ="" > |
<%@ tag variable-class="" %> | <jsp.directive.tag ="" > |
<%@ tag declare="true/false" %> | <jsp.directive.tag ="" > |
<%@ tag scope="AT_BEGIN,AT_END,NESTED" %> | <jsp.directive.tag ="" > |
<%@ tag description="" %> | <jsp.directive.tag ="" > |
- include¥Ç¥£¥ì¥¯¥Æ¥£¥Ö
- taglib¥Ç¥£¥ì¥¯¥Æ¥£¥Ö
JSP¤Î¼ÂÁõ †
JSP¤Î¥é¥¤¥Õ¥µ¥¤¥¯¥ë †
- ¡JSP¥×¥ê¥³¥ó¥Ñ¥¤¥ë
- JSP¤ò¥µ¡¼¥Ö¥ì¥Ã¥È¤Î¥½¡¼¥¹¥³¡¼¥É¤Ë¥×¥ê¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹
- ¥×¥ê¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤¿¥¯¥é¥¹¤Ï¡¢HttpServlet?¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¼ÂÁõ¤Ç¤¹
- ¥×¥ê¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤¿¥¯¥é¥¹¤Ï¡¢(Tomcat¤Î¾ì¹ç)HttpJspBase?¤ò·Ñ¾µ¤·¤Æ¤¤¤Þ¤¹
- HttpJspBase?¤Ï¡¢J2EE¥³¥ó¥Æ¥Ê¤«¤é¤Î½èÍýÍ×µá¤òJSP¤«¤é¥×¥ê¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤¿¥á¥½¥Ã¥É¤ËÃæ·Ñ¤·¤Þ¤¹
- ¢XXX_jsp¥³¥ó¥Ñ¥¤¥ë
- £XXX_jsp¥í¡¼¥É
- ¤XXX_jsp¥¤¥ó¥¹¥¿¥ó¥¹À¸À®
- ¥init(jspInit)¸Æ¤Ó½Ð¤·
- ¦service(_jspService)¸Æ¤Ó½Ð¤·
- §destroy(jspDestory)¸Æ¤Ó½Ð¤·
JSP¤ÎÊÑ¿ô¥¹¥³¡¼¥×¤È°ÅÌÛ¥ª¥Ö¥¸¥§¥¯¥È †
JSP Config (web.xml) †
ɸ½à¥¢¥¯¥·¥ç¥ó †
Bean Áàºî †
- <jsp:useBean>
- ¥µ¡¼¥Ö¥ì¥Ã¥È¤ÎÆâÉôÊÑ¿ôid ¤Ë¡¢scope¤Ë³ÊǼ¤µ¤ì¤Æ¤¤¤ë¥ª¥Ö¥¸¥§¥¯¥È¤òÆɤ߽Ф¹
- °ɬ¿Ü | °À | ÀâÌÀ |
¡û | id | ̾Á° |
¢¤ | class | ´°Á´½¤¾þ¥¯¥é¥¹Ì¾ |
¢¤ | type | Abstract¥¯¥é¥¹Ì¾¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹Ì¾ |
¢¤ | beanName | ¥ª¥Ö¥¸¥§¥¯¥È̾ |
| scope | page(¥Ç¥Õ¥©¥ë¥ÈÃÍ)¡¢request¡¢session¡¢application |
- °À¤ÎÁȤ߹ç¤ï¤»
°À | if scope.getAttribute("id")!=null | if scope.getAttribute("id")==null |
class | class id=scope.getAttribute("id") | type id=new class() |
type | type id=scope.getAttribute("id") | ERROR |
class+type | type id=scope.getAttribute("id") | type id=new class() |
type+beanName | type id=scope.getAttribute("beanName") | ERROR |
- <jsp:setProperty>
- <jsp:getProperty>
- name¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¡¢ÃͤòÆɤ߹þ¤ß¡¢JSPWriter¤Ë½ÐÎϤ¹¤ë
- °ɬ¿Ü | °À | ÀâÌÀ |
¡û | name | ̾Á° (+<jsp:useBean> ¤Î id) |
¡û | property | Æɤ߹þ¤à name Æâ¤Î¥Õ¥£¡¼¥ë¥É¤Î̾Á° |
Include / Forward †
- <jsp: include>
- JSP¼Â¹Ô»þ¤Ë¡¢Â¾¤ÎJSP¤ò¼è¤ê¹þ¤à
| <%@ include> | <jsp:include> |
³µÍ× | JSP¥×¥ê¥³¥ó¥Ñ¥¤¥ë»þ¤Ë¼è¤ê¹þ¤ß | ¼Â¹Ô»þ¤Ë¼è¤ê¹þ¤ß |
JSP¼è¤ê¹þ¤ß | ¡û | ¡û |
HTML¼è¤ê¹þ¤ß | ¡û | ¡û |
Servlet¼è¤ê¹þ¤ß | ¡ß | ¡û |
¥Ñ¥é¥á¡¼¥¿°ú¤ÅϤ· | ¡ß | ¡û |
- °ɬ¿Ü | °À | ÀâÌÀ |
¡û | page | ¼è¤ê¹þ¤à»ñ»º¤ÎURL |
| flush | false(¥Ç¥Õ¥©¥ë¥È)/true |
- ¼ÂÁõÎã
- IncludeExam?.jsp
<%@ page contentType="text/html;charset=Windows-31J" %>
<html>
<head>
<title>JSP Include Example</title>
</head>
<body>
¢¦¿ÆJSP³«»Ï¢¦
<hr/>
<jsp:include page="/include.jsp" flush="true">
<jsp:param name="name" value="Taro"/>
<jsp:param name="tel" value="03-xxxx-xxxx"/>
<jsp:param name="tel" value="090-yyyy-yyyy"/>
</jsp:include>
<hr/>
¢¤¿ÆJSP½ªÎ»¢¤
</body>
</html>
- include.jsp
<%@ page contentType="text/html;charset=Windows-31J" %>
--¢¦»ÒJSP³«»Ï¢¦--
<hr/>
<table>
<tr>
<td>¡ð{param.name}</td>
<td>=</td>
<td>${param.name}</td>
</tr>
<tr>
<td>¡ð{paramValues.tel[0]}</td>
<td>=</td>
<td>${paramValues.tel[0]}</td>
</tr>
<tr>
<td>¡ð{paramValues.tel[1]}</td>
<td>=</td>
<td>${paramValues.tel[1]}</td>
</tr>
<tr>
<td><%= request.getParameter("name") %></td>
<td>=</td>
<td><%= request.getParameter("name") %></td>
</tr>
<tr>
<td><%= request.getParameterValues("tel")[0] %></td>
<td>=</td>
<td><%= request.getParameterValues("tel")[0] %></td>
</tr>
<tr>
<td><%= request.getParameterValues("tel")[1] %></td>
<td>=</td>
<td><%= request.getParameterValues("tel")[1] %></td>
</tr>
</table>
<hr/>
--¢¤»ÒJSP½ªÎ»¢¤--
<html> ¤ÏÉÔÍ×
- <jsp: fowrard>
- JSP¼Â¹Ô»þ¤Ë¡¢Â¾¤ÎJSP¤Ëº¹¤·Âؤ¨¤ë
- °ɬ¿Ü | °À | ÀâÌÀ |
¡û | page | ¼è¤ê¹þ¤à»ñ»º¤ÎURL |
| flush | false(¥Ç¥Õ¥©¥ë¥È)/true |
- ¼ÂÁõÎã
- ForwardExam?.jsp
<%@ page contentType="text/html;charset=Windows-31J" %>
<html>
<head>
<title>JSP Forward Example(Parent)</title>
</head>
<body>
¢¦¿ÆJSP³«»Ï¢¦
<hr/>
<jsp:forward page="/forward.jsp">
<jsp:param name="name" value="Taro"/>
<jsp:param name="tel" value="03-xxxx-xxxx"/>
<jsp:param name="tel" value="090-yyyy-yyyy"/>
</jsp:forward>
<hr/>
¢¤¿ÆJSP½ªÎ»¢¤
</body>
</html>
- forward.jsp
<%@ page contentType="text/html;charset=Windows-31J" %>
<html>
<head>
<title>JSP Forward Example(Child)</title>
</head>
<body>
--¢¦»ÒJSP³«»Ï¢¦--
<hr/>
<table>
<tr>
<td>¡ð{param.name}</td>
<td>=</td>
<td>${param.name}</td>
</tr>
<tr>
<td>¡ð{paramValues.tel[0]}</td>
<td>=</td>
<td>${paramValues.tel[0]}</td>
</tr>
<tr>
<td>¡ð{paramValues.tel[1]}</td>
<td>=</td>
<td>${paramValues.tel[1]}</td>
</tr>
<tr>
<td><%= request.getParameter("name") %></td>
<td>=</td>
<td><%= request.getParameter("name") %></td>
</tr>
<tr>
<td><%= request.getParameterValues("tel")[0] %></td>
<td>=</td>
<td><%= request.getParameterValues("tel")[0] %></td>
</tr>
<tr>
<td><%= request.getParameterValues("tel")[1] %></td>
<td>=</td>
<td><%= request.getParameterValues("tel")[1] %></td>
</tr>
</table>
<hr/>
--¢¤»ÒJSP½ªÎ»¢¤--
</body>
</html>
<html> ¤¬É¬Í×
Applet †
<jsp:plugin
type="bean|applet"
code="classFileName"
codebase="classFileDirectoryName"
[ name="instanceName" ]
[ archive="URIToArchive, ..." ]
[ align="bottom|top|middle|left|right" ]
[ height="displayPixels" ]
[ width="displayPixels" ]
[ hspace="leftRightPixels" ]
[ vspace="topBottomPixels" ]
[ jreversion="JREVersionNumber | 1.1" ]
[ nspluginurl="URLToPlugin" ]
[ iepluginurl="URLToPlugin" ] >
[ <jsp:params>
[ <jsp:param name="parameterName" value="parameterValue" /> ]+
</jsp:params> ]
[ <jsp:fallback> text message for user </jsp:fallback> ]
</jsp:plugin>
tag¥Õ¥¡¥¤¥ë †
- <jsp:invoke>
- <jsp:doBody>
XML¥·¥ó¥¿¥Ã¥¯¥¹ †
JSP Syntax | XML Syntax |
<%-- ... --%> | <!-- ... --> |
<%! ... %> | <jsp:declaration> ... </jsp:declaration> |
<%@ include ... /> | <jsp:directive.include ... /> |
<%@ page ... /> | <jsp:dicectiove.page ... /> |
<%@ taglib uri="yyy" prefix="xxx" /> | <html xmlns:xxx="yyy"/> = <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:xxx="yyy" version="2.0> |
<%= ... %> | <jsp:expression> ... </jsp:expression> |
<% ... %> | <jsp:scriptlet> ... </jsp:scriptlet> |
Template Data | <jsp:text> ... </jsp:text> |
XHTML †
- JSP
<?xml version="1.0" encoding="Windows-31J" ?>
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:output
omit-xml-declaration="false"
doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML Basic 1.0//EN"
doctype-system="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd" />
<jsp:element name="sector">
<jsp:attribute name="name">accounting</jsp:attribute>
<jsp:body>
<jsp:element name="employee">
<jsp:attribute name="name">Taro</jsp:attribute>
<jsp:body>A-Class</jsp:body>
</jsp:element>
<jsp:element name="employee">
<jsp:attribute name="name">Jiro</jsp:attribute>
<jsp:body>B-Class</jsp:body>
</jsp:element>
<jsp:element name="employee">
<jsp:attribute name="name">Sabro</jsp:attribute>
<jsp:body>C-Class</jsp:body>
</jsp:element>
</jsp:body>
</jsp:element>
</jsp:root>
- ½ÐÎÏ
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<sector name="accounting">
<employee name="Taro">A-Class</employee>
<employee name="Jiro">B-Class</employee>
<employee name="Sabro">C-Class</employee>
</sector>
<jsp:output omit-xml-declaration="xxx"> | <?xml version="1.0" encoding="UTF-8"?>¤Î½ÐÎÏ |
true or on (¥Ç¥Õ¥©¥ë¥ÈÃÍ) | ½ÐÎϤµ¤ì¤Ê¤¤ |
false of off | ½ÐÎϤµ¤ì¤ë |
core †
- taglibÀë¸À
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
- set,out,remove
- ¥½¡¼¥¹¥³¡¼¥É
- ¡set¥¿¥°¤Ï¥¹¥³¡¼¥×¤Ëʸ»úÎó¤ò³ÊǼ¤¹¤ë
- ¥¹¥³¡¼¥×¤ËľÀܳÊǼ¤¹¤ë¤È¤
ɬ¿Ü | °À | ÃÍ |
¡û | var | ¥»¥Ã¥È¤¹¤ëʸ»úÎó¤Î¥¹¥³¡¼¥×¤Ø¤Î³ÊǼ̾ |
¡û | value | ³ÊǼ¤¹¤ëʸ»úÎó |
| scope | page(¥Ç¥Õ¥©¥ë¥È),request,session,application |
- ¥¹¥³¡¼¥×¤Ë³ÊǼ¤µ¤ì¤Æ¤¤¤ëMap/Bean¤Î°À¤È¤·¤Æ³ÊǼ¤¹¤ë¤È¤
ɬ¿Ü | °À | ÃÍ |
¡û | target | Bean / Map ¤Î¥¹¥³¡¼¥×¤Ø¤Î³ÊǼ̾ |
¡û | property | ¥»¥Ã¥È¤¹¤ëʸ»úÎó¤Î Bean / Map Æâ¤Î°À̾ |
¡û | value | ³ÊǼ¤¹¤ëʸ»úÎó |
| scope | page(¥Ç¥Õ¥©¥ë¥È),request,session,application |
- ¤remove¥¿¥°¤Ï¥¹¥³¡¼¥×¤«¤é¥ª¥Ö¥¸¥§¥¯¥È¤òºï½ü¤¹¤ë
ɬ¿Ü | °À | ÃÍ |
¡û | var | ºï½ü¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¹¥³¡¼¥×¤Ø¤Î³ÊǼ̾ |
| scope | page(¥Ç¥Õ¥©¥ë¥È),request,session,application |
- if,forEach
¢¨[1,2,1,2,1,2]¤ÏLinkedList?
- forTokens,choose,when,otherwise
- url
- catch,import,redirect,param
<c:catch var="exp">
<c:import url="/include.jsp">
<c:param name="name" value="Taro"/>
<c:param name="tel" value="03-xxxx-xxxx"/>
<c:param name="tel" value="090-yyyy-yyyy"/>
</c:import>
</c:catch>
<c:if test="${not empty exp}">
<c:redirect url="/error.jsp" context="exp">
<c:param name="name" value="Taro"/>
</c:redirect>
</c:if>
- c:catch ¥¨¥é¡¼¤Î¸¡½Ð
- c:import
- jsp:include¤ÈƱ¤¸
- url°À(jsp:include¤Ç¤Ïpage°À) ¤Ï¡¢c:url ¤ÈƱÍͤËsessionid¤¬Éղ䵤ì¤ë
- c:param ¤Ç¡¢¼è¤ê¹þ¤àJSP¤Ë¥Ñ¥é¥á¡¼¥¿¤òÅϤ¹¤³¤È¤¬¤Ç¤¤ë
- c:redirect
- jsp:forward¤ÈƱ¤¸
- url°À(jsp:forward¤Ç¤Ïpage°À) ¤Ï¡¢c:url ¤ÈƱÍͤËsessionid¤¬Éղ䵤ì¤ë
- jsp:forward ¤È°ã¤¤¡¢¥³¥ó¥Æ¥Ê³°¤Î URL ¤ò»ØÄꤹ¤ë¤³¤È¤â½ÐÍè¤ë
- context¤Ë¡¢exception ¤òÀßÄê¤Ç¤¤ë
- c:param ¤Ç¡¢Å¾Á÷ÀèJSP¤Ë¥Ñ¥é¥á¡¼¥¿¤òÅϤ¹¤³¤È¤¬¤Ç¤¤ë
sql †
- taglibÀë¸À
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
- data source ¤ÎÄêµÁ
- select
<sql:query var="queryResult"
sql="SELECT * FROM ORDER_TABLE WHERE CUSTOMER_ID=? ORDER BY ORDER_DATE">
<sql:param value="${id}"/>
</sql:query>
<c:forEach var="row" items="${queryResult.rows}>
<c:out value="${row.order_date}/>
<c:out value="${row.customer_id}/>
<c:out value="${row.status}/>
<br/>
</c:forEach>
- update / insert / delete
<sql:transaction>
<sql:update
sql="UPDATE ORDER_TBLE SET STATUS=? WHERE ORDER_ID=?">
<sql:param value="${stat}"/>
<sql:param value="${id}"/>
<sql:update>
<sql:query
sql="DELETE LOCK_TBLE WHERE LOCK_ID=?">
<sql:param value="${lock}"/>
<sql:update>
</sql:transaction>
format †
- taglibÀë¸À
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
- ¥Ç¥Õ¥©¥ë¥È¥í¥±¡¼¥ë¤ÎÀßÄê Java SJC-WC web.xml#context-param
<context-param>
<!-- ¥Ç¥Õ¥©¥ë¥È ¥í¥±¡¼¥ë -->
<param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
<param-value>ja</param-value>
<!-- »ØÄꤵ¤ì¤¿¥í¥±¡¼¥ë¤Î¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Ê¤¤»þ¤Ë»È¤¦¥í¥±¡¼¥ë -->
<param-name>javax.servlet.jsp.jstl.fmt.fallBackLocale</param-name>
<param-value>ja</param-value>
</context-param>
- ¥í¥±¡¼¥ë¤ÎÀßÄê
<fmt:setLocale value="jp"/>
- HTTP HEADER ¤Î Accept-Language ¤ò¾å½ñ¤
- Ä̾ï¤Ï»È¤ï¤Ê¤¯¤Æ¤è¤¤
- HTTP REQUEST¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°
<fmt:requestEncoding value="UTF-8"/>
- Ä̾ï¤Ï¥Õ¥£¥ë¥¿¤ò¤«¤Þ¤¹
- J2EE¥³¥ó¥Æ¥Ê¤¬¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤·¤Æ¤«¤é¡¢JSP/Servlet ¤ËÀ©¸æ¤ò°Ü¤¹¼ÂÁõ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤â¤¢¤ë(;·×¤Ê¤³¤È¤¹¤ë¤Ê!!)
- ¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤ÎÍøÍÑ
<fmt:setBundle basename="resources/application" var="msg" />
<fmt:message key="err.msg1" bundle="${msg}/>
xml †
- taglibÀë¸À
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
- x:transform
- x:parse
- x:out
- x:parse ¤Ç¼èÆÀ¤·¤¿ DOM ¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¡¢XPath¤Ç»ØÄꤷ¤¿Í×ÁǤΤòÈ´¤½Ð¤·¤Æ½ÐÎÏ
»²¹Íʸ¸¥ †
- JSR-000152 JavaTM JSP 2.0 »ÅÍͽñ, http://jcp.org/en/jsr/detail?id=152 (¤³¤Á¤é¤ò¼ç¤ËÊÙ¶¯)
- SUN¶µ²Ê½ñ Web¥³¥ó¥Ý¡¼¥Í¥ó¥È¥Ç¥Ù¥í¥Ã¥Ñ(SJC-WC 310-81),æƱɼÒ,ÊÆ»³³Ø,2006 (Êä»ñÎÁ¡¢Îý½¬ÌäÂê)
- JSR-000052 JSP Standard Tag Library »ÅÍͽñ, http://jcp.org/en/jsr/detail?id=52
- 10Æü¤Ç¤ª¤Ü¤¨¤ëJakartaÆþÌ綵¼¼, æƱ˼Ò, »³Åľʹ², 2003
- JSTLÆþÌç: ¼°¸À¸ì, IBM Developer Works, Mark A. Kolb(IBM), 2003, http://www-06.ibm.com/jp/developerworks/java/030411/j_j-jstl0211.shtml
- JSTLÆþÌç: ³Ë¿´(core)¤Ë¿¨¤ì¤ë, Mark A. Kolb(IBM), 2003, http://www-06.ibm.com/jp/developerworks/java/030516/j_j-jstl0318.shtml
- JSTLÆþÌç: ¥×¥ì¥¼¥ó¥Æ¡¼¥·¥ç¥ó¤¬¤¹¤Ù¤Æ, IBM Developer Works, Mark A. Kolb(IBM), 2003, http://www-06.ibm.com/jp/developerworks/java/030620/j_j-jstl0415.shtml
- JSTLÆþÌç Âè4²ó:SQL¤ª¤è¤ÓXML¥³¥ó¥Æ¥ó¥Ä¤Ø¤Î¥¢¥¯¥»¥¹, IBM Developer Works, Mark A. Kolb(IBM), 2003, http://www-06.ibm.com/jp/developerworks/java/030718/j_j-jstl0520.shtml
Java