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 introduces many other problems...). As the page says, make
sure your <webapp> element starts like this:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4">

Otherwise the container will assume the servlet 2.3 spec and EL will not
be allowed outside of JSTL (1.0) tags. The fn:length() function I
originally mentioned is part of JSTL 1.1 anyway so it sounds like you
just need to make sure everything is configured for the current specs
and you should be good. Hope that will fix it up for you.

 -Christian

Murray Steele wrote:

> 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 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 in my WAR project and
> > specify them in the web.xml file.
> >
> > Thanks again.
> >
> > Marius
> >
> > -----Original Message-----
> > From: Murray Steele [mailto:[EMAIL PROTECTED]
> > Sent: 02 August 2005 02:31
> > To: Tag Libraries Users List
> > Subject: Re: How to print an "int" with a c:out tag?
> >
> >
> > 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 and hence Standard 1.1 and / or Tomcat 5.x.  (I think those
> > versions are correct, someone correct me if I'm wrong).
> >
> > If you cant change the version of Tomcat / JSTL you use:
> > 1. You could alter your myController.getOpenActivitiesForResource
> > method to return a class that extends list to provide a getSize() (and
> > hence your original <c:out value="${myList.size}"/> would work.
> > 2. Find some other Tag lib that lets you output list sizes.
> > (unstandard from the sandbox does this)
> > 3. Just use a scriptlet <%= ((MyControllerClass)
> > pageContext.findAttribute("myController")).getOpenActivitiesForResource
> > (
> > ).size() %>.
> >
> > Muz
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> --
> Murray Steele
> Senior Developer
>
> Peoples Archive
> w: http://www.peoplesarchive.com
> t: 0207 323 0323
> d: 0207 631 9147
>
> This email has been scanned by Postini.
> For more information please visit http://www.postini.com
>
>
> ---------------------------------------------------------------------
> 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