HI,
I think I've found a JSP parsing problem and would like confirmation.

Here is the situation for the classes:

interface Product {
  public String getId();
}

interface Pet extends Product {
  public double getWeight();
}

public class PetImpl implements Pet {

  public String getId();
  public double getWeight();
}

The page has a product of type Product in page scope. We use the
following tag
to get the correct casting of the PetImpl object.

<jsp:useBean id="product" type="com.ratex.common.Pet" scope="page" />

Then we go to use it.

  <tr>
    <td><jsp:getProperty name="product" property="id" /></td>
    <td><jsp:getProperty name="product" property="weight" /></td>
  </tr>

And get the following error.

-----------------
500 Internal Server Error

Error parsing JSP page /pet_db.jsp line 59

Property 'id' in the 'com.ratex.common.Pet' type bean not found
--------------------------------------------

If I comment out the first get:property then the page will compile and
run.

A Pet is a Product so I believe this may be a bit aggressive in the
parse phase. It works
on Resin FWIW.

Platform
Linux RedHat 6.1
Sun jdk1.2.2-001
Orion 1.0rc1

Any insights or help is appreciated.
Eric :-)



Reply via email to