struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frederico Augusto Costa" <facosta_lis...@terra.com.br>
Subject Re: possible bug in struts?
Date Mon, 26 Jan 2004 22:20:49 GMT
Did you import your class in JSP?
----- Original Message ----- 
From: "Paul Daniell" <pdaniell@ign.com>
To: "Struts Developers List" <struts-dev@jakarta.apache.org>
Sent: Monday, January 26, 2004 6:55 PM
Subject: possible bug in struts?


I've encountered a strange problem with Struts when used with Torque. I
retrieve an object using the following:

ArrayList list = (ArrayList)ComponentPeer.doSelect(new Criteria());
request.setAttribute("components", list);
Component c = (Component)list.get(0);
request.setAttribute("comptest", c);
System.out.println(c.getName());

In the logs this will appropriately print the name of the object "c".
However, when I invoke the following JSP
...
<html><body>
<c:out value="${comptest.name}"/>
</body></html>


I get the following Exception:

HTTP ERROR: 500 An error occurred while evaluating custom action attribute
"value" with value "${comptest.name}": An error occurred while getting
property "name" from an instance of class
org.ttemplating.internal.dataobjects.Component
(java.lang.IllegalArgumentException: object is not an instance of declaring
class)

Any advice appreciated.
Paul




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message