Ciao Ragazzi,
il mio problema è il seguente: nella mia action ho una lista ,la metto in request ed è valorizzata vedendola in debug.Nella mia jsp faccio un banale controllo ossia se è piena faccio vedere questa lista e me la stampa se è vuota niente.L applicazione non va in errore ma non mi fa vedere la lista.Grazie in anticipo
Action elencoAllegati è piena
codice:request.setAttribute("ELENCO_ALLEGATI", elencoAllegati);
Jsp
codice:<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> <% String userid = (String) session.getAttribute("userID"); if (userid == null) { response.sendRedirect("../responsabileInserimento.jsp"); } else { %> <% String id = (String) session.getAttribute("ID"); System.out.println("ID" + id); %> <div id="left"> <ul> [*]<html:link page="/ente.do?action"><bean:message key="menu.ente"/></html:link> [*]<html:link page="/atto.do?action"><bean:message key="menu.atto"/></html:link>[/list] </div> <div id="center"> <h1>Inserimento allegati</h1> <html:form action="/allegato" enctype="multipart/form-data"> <html:hidden property="method" value="salvaAllegato"/> <label>Allegati</label><html:file property="allegato"></html:file></p> <label>Tipo Allegato</label><html:select property="idTipoAllegato"> <html:option value="" /> <html:optionsCollection name="listaTipoAllegato" label="tipo" value="idTipoAllegato" /> </html:select></p> <!--p><label>Nome file</label><html:text property="nomeFile" size="30" maxlength="30" styleId="nomeFile" /></p--> <label>DataInserimento</label><html:text property="dataInserimento" size="30" maxlength="30" /></p> <label>DataModifica</label><html:text property="dataModifica" size="30" maxlength="30" /></p> <p class="alignCenter"> <html:button property="button" onclick="salvaAllegato();"><bean:message key="inserisci.messages" /></html:button> </p> <c:if test="${not empty allegatoForm.elencoAllegati}"> aaaa <table cellpadding="5" cellspacing="0" width="600"> <tr> <td> <table width="80%" align="center" cellspacing="0" cellpadding="5"> <c:forEach items="${allegatoForm.elencoAllegati}" var="allegato"> <tr> <td width="50%" class="testo" align="right"> <a href="javascript:visualizzaAllegatoContenutoNewsletter(<c:out value="${allegato.idAllegato}"/>)" class="testoLink" title="Scarica l'allegato"> <c:out value="${allegato.descrizione}"/> </a> </td> <td width="50%"> <input class="pulsante" type="button" value="Rimuovi" onClick="rimuoviAllegatoDalContenuto('<c:out value="${allegato.idAllegato}"/>')"> </td> </tr> </c:forEach> </tr> </table> </td> </tr> </table> </c:if> <table> <tr> <td align="right" class="testo">Allegati</td> <c:if test="${not empty ELENCO_ALLEGATI}"> <td align="left"> <html:select property="idAllegato" size="3" style="width:200px;"> <html:options collection="ELENCO_ALLEGATI" property="idAllegato" labelProperty="nomeFile"/> </html:select> </td> </c:if> <c:if test="${not empty allegatoForm.idAtto}"> <td align="left"> <table> <tr> <td> <input class="pulsante" style="width: 134px;" type="button" value="Allega File" onClick="salvaAllegato()"> </td> </tr> <c:if test="${not empty sessionScope.ELENCO_ALLEGATI}"> <tr> <td> <input class="pulsante" style="width: 134px;" type="button" value="Rimuovi allegato" onclick="rimuoviAllegatoNotizia()"> </td> <tr> <td> <input class="pulsante" style="width: 134px;" type="button" value="VisualizzaAllegato" onclick="getAllegato(document.notiziaForm)"> </td> </tr> </c:if> </table> </td> </c:if> </tr> </table> </html:form></div> <% } %>

.Grazie in anticipo
Rispondi quotando

