Chris,

One other thing you can try:

xmlns:c="http://java.sun.com/jsp/jstl/core";

I believe this is the correct taglib URI. You are missing the /jsp/ part.

I've not tried using the /jsf-libs/ directory in JBoss, preferring to deploy my JARs with my webapps. However, I assume that should work fine for you...

Have you had any luck yet?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Chris Hane wrote:
Thanks for the reply.

I found the jstl file; but there wasn't a standard.jar.

So I downloaded the latest jstl (1.1.2) and standard jar from jakarata/taglibs and put them in the jboss/server/deploy/default/jbosswebapps-tomcat55.sar/jsf-libs directory. (removed the old jstl.jar which was 1.1.0).

Still getting the same error that <c:out> tag is not defined.

The weird thing is that other <c:xxx> tags work (e.g., <c:forEach> <c:set>). Just not <c:out>.

The namespace definition is:
[ui:composition is were you specify the taglibs in facelets]

<ui:composition xmlns="http://www.w3.org/1999/xhtml";
                xmlns:ui="http://java.sun.com/jsf/facelets";
                xmlns:f="http://java.sun.com/jsf/core";
                xmlns:h="http://java.sun.com/jsf/html";
                xmlns:c="http://java.sun.com/jstl/core";
                xmlns:t="http://myfaces.apache.org/tomahawk";
                xmlns:its="http://itsolut.com/jsf/components/taglib";
                xmlns:s="http://jboss.com/products/seam/taglib";
                template="/template.xhtml">

 <h:form id="form1">
 <snip a bunch of facelets stuff that does not use any <c> tags/>

 <script type="text/javascript" language="Javascript1.1">
     ship = new Array(
       <c:forEach items="#{cart.methodThatReturnsASet}" var="rate">
          new Array(<c:out value="#{rate.method.id}"/>,
                    <c:out value="#{rate.amount}"/>)
       </c:forEach>
     );
 </script>
 </h:form>

Maybe I should head over to facelets/jboss or the jstl lists?

Thanks for any suggestions,
Chris....

Jeff Bischoff wrote:
You didn't give us all of the JSP :)

What taglib lines do you have at the top?
e.g. <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

Hopefully you only used the "c" prefix once? ;)


I don't use facelets, so I'm not sure if that causes conflicts, but I am successfully using myfaces 1.1.3, jboss, jstl 1.1.2

To check your version of JSTL, find the "jstl.jar" (or similar) file. Open it with either the jar utility in java or (easier) a program like winzip. Open the file Manifest.mf, and look for lines like the following:

Implementation-Version: 1.1.2
Implementation-Vendor: Sun Microsystems, Inc.
Implementation-Vendor-Id: com.sun

You should also open "standard.jar", and make sure this is the same version as "jstl.jar".

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Chris Hane wrote:
I am trying to create an array of arrays (basically a lookup) in javascript on my page. When I execute the following, I get an error that c:out is not recognized.

<c:out> Tag Library supports namespace: http://java.sun.com/jstl/core, but no tag was defined for name: out

I am using
 - myfaces 1.1.3
 - facelets 1.1.11
 - jboss/seam (latest)
 - jstl (not sure how to tell which version - looks like 1.1)

Here is the code:

<h:form id="form1">
<snip lots of facelets code/>

<script type="text/javascript" language="Javascript1.1">
    ship = new Array(
      <c:forEach items="#{cart.methodThatReturnsASet}" var="rate">
         new Array(<c:out value="#{rate.method.id}"/>,
                   <c:out value="#{rate.amount}"/>)
      </c:forEach>
    );
</script>
</h:form>


I am trying to output two properties from each item in the set. I've tried different variations on the <c:out /> without success (<h:outputText/>, straight el without a tag, and tried replacing # with $).

Any thoughts on how I can output the two properties on the iterated items?

Thanks,
Chris....











Reply via email to