Woo Hoo!  Tomcat 4 beta is working!  Ant is working! 
 
 
Now the problem, simple little .jsp with a simple little bean.  Says that it cannot find a property that is there, the property does have getters and setters.  If I just do the jsp:usebean tag the page compiles fine, when I try hitting the properties I get the following error:  org.apache.jasper.JasperException: Cannot find any information on property 'State' in a bean of type 'com.jeff.Joe'
 
Here's the .jsp:
//////////////////////////////////////////////////////////
<html>
<%@ page language="java" %>

<body bgcolor="white">
<jsp:useBean id="taxbean" scope="application" class="com.jeff.Joe" />

<% taxbean.setState("NJ");
   taxbean.setRate(6.5);
%>
<b> Using method 1:</b> <p>
State is: <%= taxbean.getState() %> <br>
Rate is: <%= taxbean.getRate() %>
<p>
<% taxbean.setState("TX");
   taxbean.setRate(5.5);
%>
<b> Using method 2:</b> <p>
State is: <jsp:getProperty name="taxbean" property="State" />
<br>
Rate is: <jsp:getProperty name="taxbean" property="Rate" />
</body>
</html>

//////////////////////////////////////////////////////////
 
Here's the class:
//////////////////////////////////////////////////////////
package com.jeff;
public class Joe{
    String State;
    double Rate;
    public Joe() {
          this.State = "NY";
          this.Rate = 8.5;
    }
    public void setState (String stateName) {
          this.State = stateName;
    }
    public String getState() {
          return (this.State);
    }
    public void setRate (double rateValue) {
          this.Rate = rateValue;
    }
  
    public double getRate () {
          return (this.Rate);
    }
}
//////////////////////////////////////////////////////////



Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to