SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cannot find any information on property in a bean of type 'mypackage'

    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"%>
     
    <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:
        <tlib-version>1.0</tlib-version>
        <short-name>fm</short-name>
        <uri>h...</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!!

  2. #2
    SiteP0int Weazle hooknc's Avatar
    Join Date
    Dec 2004
    Location
    Socialist Republic of Boulder
    Posts
    937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know where you are getting your error of "mypackage" from, but "mypackage" does not seem to be in any of your code.

    Try the following in your JSP:

    Code:
    <&#37;@ taglib prefix="fm" uri="/WEB-INF/matcher.tld"%>
     
    <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" %>
            
            <h4>WIX files for your search 
                "${obj.keyword}"
            </h4>	
     
        	<h4>  and  
        		"${obj.kwinfo}":
        	</h4>	
        	<br> 
     
    		${fm:Matcher(obj, obj.keyword, obj.kwinfo)}
        	
    	</body>
    </html>
    baby steps... baby steps...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •