Hi
I got an error org.apache.jasper.JasperException: Cannot find any information on property in a bean of type mypackage. I tried to find the solution and found that I need to use the naming convention so I fixed it. But I still got that error. Please help me.
Here's my Jsp file.
<%@ taglib prefix="fm" uri="/WEB-INF/matcher.tld"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<jsp:useBean id="obj" scope="session" class="com.webIndex.match.Matcher"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="wixIndex.css" rel="stylesheet" type="text/css">
<title>Web Index</title>
</head>
<body>
<%@ include file="header.html" %>
<jsp:setProperty name="obj" property="*" />
<h4>WIX files for your search
"<jsp:getProperty name="obj" property="keyword"/>"
</h4>
<h4> and
"<jsp:getProperty name="obj" property="kwinfo"/>":
</h4>
<br>
${fm:Matcher(obj, obj.keyword, obj.kwinfo)}
</body>
</html>
And here's my first java program.
public class Matcher {
public static String match(FindMatch object,
String keyword, String kwinfo) {
return object.exact_match(keyword, kwinfo);
//return keyword;
}
}
And here's my second Java program.
public class FindMatch {
private String keyword;
private String kwinfo;
static String refile;
public FindMatch() {
keyword = "";
kwinfo = "";
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public String getKwinfo(){
return kwinfo;
}
public void setKwinfo(String kwinfo){
this.kwinfo = kwinfo;
}
public String exact_match(String keyword, String kwinfo) {
// do something here
return refile.toString();
}
}
And here's my 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.0</tlib-version>
<short-name>fm</short-name>
<uri>http://com.webIndex.match.Matcher.tld</uri>
<function>
<name>Matcher</name>
<function-class>
com.webIndex.match.Matcher
</function-class>
<function-signature>
java.lang.String match(
com.webIndex.match.FindMatch,
java.lang.String, java.lang.String)
</function-signature>
</function>
</taglib>
Thanks!!