jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Weßling <Achim.Wessl...@web.de>
Subject Re: using jsptl-jr
Date Thu, 13 Sep 2001 22:55:08 GMT
Hallo again ;-);

sorry for disturbing again, but I didn't get it to work. It seems that the 
scripting variable isn't been set. I made the following changes to the jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/datetime" prefix="dt" %>
<%@ taglib uri="http://java.sun.com/jsptl/ea/jr" prefix="jr" %>
<%--<%
String test = "";
%>--%>
<jr:declare id="test" type="String" />
<html>
<head>
     <title>SD-IMS Katalog</title>
</head>
<body>
     <H1>verf&uuml;gbare Karten:</H1>
     <TABLE width='100%' cellpadding='5' border='0' cellspacing='0'>
         <TR>
             <TH>Name/Datum</TH>
             <TH>Titel</TH>
             <TH>Beschreibung</TH>
         </TR>
         <jsp:useBean id="reader" class="org.infokomGT.beans.ReaderBean" 
scope="application" />
         <jr:forEach items='<%= reader.getProjects() %>' var='test' >
             <TR>
                 <TD colspan='3' align='center'>
                     -<%= test %>-
                 </TD>
             </TR>
         </jr:forEach>

         <TR>
             <TD colspan='3' bgcolor='lightgrey' align='right'>
                 <FONT size='-1'><dt:format pattern="EEEEE, dd. MMMMM yyyy 
'['HH:mm:ss z']'"><dt:currentTime/></dt:format></FONT>
             </TD>
         </TR>
     </TABLE>
     <BR>
     BeanVariable (Projects): <%--<jsp:getProperty name="reader" 
property="projects" />--%><I><%= reader.getProjects() %></I>
</body>
</html>


But the output looks like this:

verfügbare Karten:
Name/Datum Titel Beschreibung
-null-
-null-
Freitag, 14. September 2001 [00:42:32 GMT+02:00]

BeanVariable (Projects): TestOne,TestTwo

If I didn't use jr:declare, but the putcomment scriplet above the 
declare-Statement '-null-' is replaced by '--'. So, can someone explain me 
why?!

In the mean time I use Tomcat 4 RC 1!


++++++++++++++++++++++++++++++++
Achim Weßling
Achim.Wessling@web.de


Mime
View raw message