Hi,i try to use el function, but it doesn't work...
exception is :
symbol : class Test
location: class org.apache.jsp.TestEl_jsp
_jspx_fnmap_0= org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("mine:getPet", Test.class, "getPet", new Class[] {java.lang.String.class});
.class:WEB-INF\classes\Test.class
12345678910111213
import java.util.HashMap;
import java.util.Map;
public class Test {
public static String getPet(String pKey){
Map tMapOut = new HashMap();
tMapOut.put("1","Cat");
tMapOut.put("2","Dog");
tMapOut.put("3","Monkey");
return (String)tMapOut.get(pKey);
}
}
JSP file:
<%@ taglib prefix="mine" uri="OAO" %>
${mine:getPet("3")}
.tld
<?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>1.2</tlib-version>
<uri>OAO</uri>
<function>
<name>getPet</name>
<function-class>Test</function-class>
<function-signature>
java.lang.String getPet(java.lang.String)
</function-signature>
</function>
</taglib>
thanks a lot!!