Cannot find any information on property in a bean of type

Discussion in 'Java' started by Juuno, Jun 14, 2009.

  1. Juuno

    Juuno New Member

    Joined:
    Feb 3, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    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.

    Code:
    <%@ 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.

    Code:
    public class Matcher {
        
        public static String match(FindMatch object,
                String keyword, String kwinfo) {
            return object.exact_match();
            //return keyword;
        }
    }
    
    And here's my second Java program.

    Code:
    public class FindMatch {
     
        private String keyword;
        private String kwinfo;
        static String refile;
     
        
        public FindMatch() {
         }
     
        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()  {
        //    do something here
        return refile.toString();
                
           }
      }
    
    And here's my tld:

    Code:
    <?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!!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice