RE: How to print an int with a c:out tag?

2005-08-03 Thread Marius Botha
Thanks guys, I tried that and got a new error (below). I will probably just go the scriptlet route for now as maybe I have an old or incorrect JAR somewhere. Can any one tell me where the TagLib for FN is? What I did: 1. Changed web-app ... as per example. 2. Included FN taglib in my web.xml

Re: How to print an int with a c:out tag?

2005-08-03 Thread Murray Steele
As far as I can tell the taglib-location for the fn taglib should probably be: /WEB-INF/fn.tld If fn.tld isn't in the WEB-INF of your webapp you should probably do a search on your filesystem for the file and copy it into your WEB-INF. It should be present *somewhere* on your system, most

RE: How to print an int with a c:out tag?

2005-08-03 Thread Christian Taylor
I've never actually included my JSTL taglibs this way. I have just put jstl.jar and standard.jar in WEB-INF/lib. The TLD files are contained in standard.jar and should be automatically recognized by the container (Tomcat or otherwise). All I have to do then is include this line in any JSP: [EMAIL

Re: How to print an int with a c:out tag?

2005-08-02 Thread Christian Taylor
Hi Marius, Check out the fn:length() function, this is what you are looking for. size() is a method and you cannot call methods directly from JSTL (only getters and setters), but the fn taglib provides a function for length of Collections and strings. See the JSTL 1.1 documentation for more

RE: How to print an int with a c:out tag?

2005-08-02 Thread Marius Botha
Thanks, I'll try that. Cheers, Marius -Original Message- From: Christian Taylor [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:08 To: Tag Libraries Users List Subject: Re: How to print an int with a c:out tag? Hi Marius, Check out the fn:length() function, this is what you are

RE: How to print an int with a c:out tag?

2005-08-02 Thread Marius Botha
My requirement is really a bit different. I have an expression, which returns a List, the size of which I would like to display. I.e. I have ${myController.activitiesForResource}, which returns a list. If I try c:out value=${fn:length(${myController.activitiesForResource})}/ I get an error saying

Re: How to print an int with a c:out tag?

2005-08-02 Thread Murray Steele
I suspect that you are using either Tomcat 4.1.x and / or Standard 1.0x for your JSTL. EL functions are part of the JSTL 1.1 spec (JSP 2.0) and aren't supported on Tomcat 4.1.x or Standard 1.0x (JSP 1.2 and JSTL 1.0 respectively). If you want to use the fn:length you need to use JSTL 1.1

RE: How to print an int with a c:out tag?

2005-08-02 Thread Marius Botha
You know your stuff hey :) I believe I do use Tomcat 5 (running inside JBoss 3.2) and as a result have their JSTL (looks like 1.1) and JSP-2.0.jar. Where do I find or can I check if I have the TLD for the functions library (so I can include it if missing)? At the moment I am including the TLD's

Re: How to print an int with a c:out tag?

2005-08-02 Thread Murray Steele
Perhaps this page might provide the solution? http://www.oreillynet.com/cs/user/view/cs_msg/32931 Wrong taglib uri's or wrong webapp specification in your web.xml. Muz On 2 Aug 2005, at 14:32, Marius Botha wrote: You know your stuff hey :) I believe I do use Tomcat 5 (running inside JBoss

Re: How to print an int with a c:out tag?

2005-08-02 Thread Christian Taylor
My next guess was going to be one thing mentioned on the page Murray links to below. Regardless of whether you are using Tomcat 5, JSTL 1.1 and JSP 2.0... if your web.xml doesn't say it's a servlet 2.4 app it will revert to Servlet 2.3/JSP 1.2 (and trying to use JSTL 1.1 with JSP 1.2 probably