Hello
I'm a
JSP beginner and would like to give out my "Project List"
in a html table. It's working when I use the normal jstl core
library. To make it look more pretty I tried to use the Display
Tag Library 1.1 - but without success.
I'm not using
Struts but something like that. It's a framework
which is self written (not by me).
Maybee some JSP specialist could help me with the DisplayTagLib.
----------------------------------------------------------------
-- this here is working fine
-- (Reading my "Projekte" ArrayList out of my session formBean)
----------------------------------------------------------------
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<table border="0" cellpadding="4" width="100%" cellspacing="0">
<tr>
<th nowrap width="30%">Beschreibung</th>
<th nowrap width="12%">Beginn</th>
<th nowrap width="12%">Ende</th>
</tr>
<c:forEach var="projekt" items="${sessionScope.formBean.projekte}" varStatus="status">
<tr class="${status.index % 2 == 0 ? "dunkelgrau" : "hellgrau"}">
<td nowrap width="30%"><c
ut value="${projekt.beschreibung}" /></td>
<td nowrap width="12%"><c
ut value="${projekt.beginn}" /></td>
<td nowrap width="12%"><c
ut value="${projekt.ende}" /></td>
</tr>
</c:forEach>
</table>
---------------------------------------------------------------
Now I'd like to do the same with the DisplayTagLib, but without success.
Again I would like to read my "Projekte" ArrayList out of my session formBean (like above).
First I installed the commons*.jar an the displaytag-1.1.jar into
my Tomact 5 deployment directory.
Then I tried:
----------------------------------------------------------------
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<display:table name="projekte" list="${sessionScope.formBean.projekte}"/>
</display> ==> Here I get: "Nothing found to display. "
Then I tried:
----------------------------------------------------------------
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<display:table name="${sessionScope.formBean.projekte}"/>
</display> ==> Here I get a beautiful
Java Exception Stack which I'm not able to interpret.
Does anyone have an idea what I did do wrong
Thanks
Regards,
Reto