menu
書いてる野郎
orebike@gmail.com
In this case, I make getting String and Return String method.
Create static method.
Make taglib file. Writing called name, target class and target method name.
<?xml version="1.0" ?> <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> <function> <name>hoge</name> <function-class>jp.co.hogehoge.util.Hoge</function-class> <function-signature>java.lang.String aaa(java.lang.String)</function-signature> </function> </taglib>
Import the taglib file in JSP file.
<%@taglib uri='/WEB-INF/tlds/hoge.tld' prefix='hhh' %>
prefix is called name in JSP file.