tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Giannini" <mgiann...@thunderhead.com>
Subject How do i use xmlns directive for including a taglib with Tomcat?
Date Wed, 08 Feb 2006 23:01:46 GMT
Hi,

 

I am trying to get this simple JSP page to work using the xmlns method
of including a tag library.  I noticed that all the jsp2 examples with
Tomcat 5.5.x do not use the xmlns method, but they use taglib directives
like : <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

 

However, I would like to do the following so that my JSP page is XML
complient:  This JSP page below simply displays a table with the
headings only.  If I remove the xmlns:c and insert the taglib directive
like above, this will work (i.e. it will display the dynamic content
using the tags correctly).

 

Can somebody please tell me if Tomcat 5.5.x does not support the xmlns
method of using tag libraries, or help me understand where I am going
wrong?

 

Many thanks in advance,

Matthew giannini

 

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

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

<head>

    <title>JSP Tutorial Stuff</title>

</head>

<body>

  <table>

    <tr>

      <th>Value</th>

      <th>Square</th>

    </tr>

    <c:forEach var="x" begin="0" end="10" step="2">

      <tr>

        <td>

          <c:out value="${x}"/>

        </td>

        <td>

          <c:out value="${x * x}"/>

        </td>

      </tr>

    </c:forEach>

  </table>

</body>

</html>

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message