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 PROTECTED] uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>

(modify for the sql, fmt, xml and function taglibs of course)

I wonder if trying to put your own entry in web.xml and use separate TLD
files is causing problems?

 -Christian

-----Original Message-----
From: Marius Botha [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 03, 2005 6:52 AM
To: 'Tag Libraries Users List'
Subject: RE: How to print an "int" with a c:out tag?

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 file as I do with the other ones I
use:
  <taglib>
    <taglib-uri>/tags/fn</taglib-uri>

<taglib-location>http://java.sun.com/jsp/jstl/functions</taglib-location
>
  </taglib>
  <taglib>
    <taglib-uri>/tags/jstl-core</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
  </taglib>

Then I get "File "http://java.sun.com/jsp/jstl/functions"; not found",
OR, If I don't import the taglib in my web.xml file and just try to use
it, I
get:
"The attribute prefix fn does not correspond to any imported tag
library"

Thanks again for you patience, you've been a great help and I've learned
quite a bit.

Thanks,

Marius

-----Original Message-----
From: Christian Taylor [mailto:[EMAIL PROTECTED]
Sent: 02 August 2005 07:59
To: Tag Libraries Users List
Subject: Re: How to print an "int" with a c:out tag?


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


---------------------------------------------------------------------
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