Sorry it's right, it compares only against a constant value.

Can you write me your code? I think with <%=theNumber%> it must function.

-----Ursprungliche Nachricht-----
Von: mucus snot [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 21. Oktober 2003 16:35
An: [EMAIL PROTECTED]
Betreff: greaterThan tag


I tried the direct comparison and the page compiles, but it makes the 
comparison against the string "theNumber" (incorrectly).
Al

Message-ID: <[EMAIL PROTECTED]>
From: "Otto, Frank" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: AW: greaterThan tag
Date: Tue, 21 Oct 2003 11:25:05 +0200
MIME-Version: 1.0
Content-Type: text/plain

Hi,

you can directly compare:

<bean:define id="theNumber" name="searchStats" property="topHits" 
scope="request"/>

<logic:greaterThan name="bean_name" property="property_name" value="theNumber">
        ...
</logic:greaterThan>


Regards,

Frank

-----Ursprungliche Nachricht-----
Von: mucus snot [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 21. Oktober 2003 11:14
An: [EMAIL PROTECTED]
Betreff: greaterThan tag


Hi,
I am trying to use logic:greaterThan, but comparing a bean property to
another bean property.
The code that I am using is
<logic:greaterThan name="searchStats" property="numHits" value="     " >
When value is a constant,  the code works.
But when I define a bean <bean:define id="theNumber" name="searchStats"
property="topHits" scope="request">
and refer to this in the tag value="<%= theNumber %>", it won't compile
because of a problem with setValue.

error:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 45 in the jsp file: /results.jsp

Generated servlet error:
      [javac] Compiling 1 source file

C:\dropbox\eclipse\...\results_jsp.java:240: cannot resolve symbol
symbol  : method setValue (java.lang.Object)
location: class org.apache.struts.taglib.logic.GreaterThanTag
            _jspx_th_logic_greaterThan_1.setValue( theNumber );

apologies for not being very adept at debugging jsp

Any help appreciated,
Al  


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to