2 Replies Latest reply on Oct 2, 2014 10:46 AM by karlnicholas

    Problem with JSTL <c:out value="" /> tag on Jboss EAP 6.3.

    karlnicholas

      Running on Jboss EAP 6.3 locally. Deploying with Eclipse. The jstl <c:out value="" /> tag does not seem to be working. Any ideas?

       

      My .xhtml page is really very simple. It mixes JSF and JSTL. See attachment.

       

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

        • 1. Re: Problem with JSTL <c:out value="" ></c:out> tag on Jboss EAP 6.3.
          ctomc

          You are mixing facelets with jsf tags and jsp with JSTL tags.

           

          your template should be something like this: (not tested)

           

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

          <ui:composition template="/WEB-INF/templates/default.xhtml"

              xmlns="http://www.w3.org/1999/xhtml"

              xmlns:f="http://java.sun.com/jsf/core"

              xmlns:h="http://java.sun.com/jsf/html"

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

              xmlns:ui="http://java.sun.com/jsf/facelets">

              <ui:define name="content">

                  <h:form>

                      <h:commandButton action="#{exportCsv.exportCsv()}" value="Export Csv" />

                      <h:commandButton action="#{exportCsv.goToIndex()}"

                          value="Go To Index" />

                  </h:form>

                  <h:outputText value="test test test" />

                  <table >

                      <tbody>

                         <ui:repeat value="#{exportCsv.csvResult}" var="csvRow">

                              <tr>

                              <ui:repeat value="#{csvRow}" var="csvRow">

                                  <td>#{csvRow}</td>

                              </ui:repeat>

                              </tr>

                          </ui:repeat>

                      </tbody>

                  </table>

              </ui:define>

          </ui:composition>

          • 2. Re: Problem with JSTL <c:out value="" ></c:out> tag on Jboss EAP 6.3.
            karlnicholas

            Ok, thanks. I had picked up on stackexchange that it was OK to mix JSTL and Facelets, but I guess not. I am supposing that it has something to do with rendering during view construction vs. rendering during some other something -- things I really haven't sat down to try and figure out yet. Is there a quick source on why facelets and JSTL can't be mixed? I mean, the <c:forEach> tags were working, only the <c:out> tag wasn't working, so I'm still not sure what the actual problem was.