Hi Friends,
I have problem with user defined function.. I have described my code and error Here ..
Please let me know the problem which i am having
Codes:
1.web.xml
<web-app 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
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<
servlet>
<servlet-name>ExpressionLanguage1</servlet-name>
<servlet-class>it.sella.kathir.ELServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ExpressionLanguage1</servlet-name>
<url-pattern>/ELOne</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
2. SamplEL.java
package it.sella.kathir;
public class SamplEL {
public static int func1() {
return 1000 ;
}
}
3.myfunction.tld (this file is in WEB-INF/myfunction.tld)
<?xml version="1.0" encoding="ISO-8859-1"?>
<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">
<uri>KathirSample</uri>
<tlib-version>1.2</tlib-version>
<function>
<name>equals</name>
<function-class>it.sella.kathir.SamplEL</function-class>
<function-signature>int func1()</function-signature>
</function>
</taglib>
4.index.jsp
<%@ taglib prefix="mine" uri="/KathirSample"%>
<html>
<body>
<br>The Tag Fun Return Val is : ${mine.equals()}
</body>
</html>
Erorr is :
org.apache.jasper.JasperException: /index.jsp(4,34) The function equals must be used with a prefix when a default namespace is not specified
What is the problem .. and how to sovle this..
please help me....
Thanks in advance