!!!ある状況において、関数を使用するELコード、EL関数のためのコード、タグライブラリ記述子にEL関数を設定するコードを書く
::static メソッドを作成する
JSPから直接呼ばれる メソッドクラス(*.java)を作成する
public class Section7_4_Util {
public static String encodeUrl(String url) {
String result = "";
try {
result = URLEncoder.encode(url, "UTF-8");
} catch (UnsupportedEncodingException e) {}
return result;
}
public static String decodeUrl(String url) {
String result = "";
try {
result = URLDecoder.decode(url, "UTF-8");
} catch (UnsupportedEncodingException e) {}
return result;
}
}
::TLD(タグライブラリディスクリプタ)を作成する
[web-jsptaglibrary_2_0.xsd|http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd]
sec7_4.tld