tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Haszlakiewicz <>
Subject Re: Expression Language in JSP and JasperException
Date Wed, 21 Feb 2007 03:58:47 GMT
On Tue, Feb 20, 2007 at 03:23:32PM -0500, David Smith wrote:
> Ok .... forgive me now, but this is getting confusing.  Where does 
> result come into this picture?  Were you expecting actionBean to be an 
> instance of a different class?  You aren't offering a lot to go on here.

That's what it sounds like to me:

> Piotr Kiraga wrote:
> >>> The problem is that there could be a class that has no property with
> >>> name result. In another case there could be another class (bean) that
> >>> has such property (than of course it works fine, but at first case
> >>> Tomcat throws exception).

I actually have some jsp code that does stuff like this, but in my case
there is a "type" property that each object has.  I check that and do
the appropriate thing.
If you want to hard code a class name in your jsp page, you can just use
${} to figure out what type of object you have.

Or, if you want to get really crazy you could loop over ${foo.class.methods}
checking if there's a method named "getResult".

But, you'd probably be better off figuring out way to ensure the objects
you're working with have a "result" property.


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message