我有一個包含其他JSP的jsp。Struts標記:一個jsp中有多個尋呼機
主JSP:
<% java.util.ArrayList <String> subJspName = (java.util.ArrayList <String>)(request.getSession().getAttribute("subJspName"));
for (int jspIdx=0; jspIdx<subJspName.size(); jspIdx++)
{%>
<jsp:include page='<%= subJspName.get(jspIdx) %>' />
<tr>
<td> </td>
</tr>
<%} %>
其他子的JSP:
<layout:pager maxPageItems="5" width="100%"
sessionPagerId="currentPageZERO"> <!-- in the second sub-JSP, it will be currentPageONE -->
<logic:notEmpty
name="tabellaGenericaForm"
property="listaLogAccordoVec[0]"> <!-- in the second sub-JSP, it will be listaLogAccordoVec[1] -->
<layout:collection
name="tabellaGenericaForm"
property="listaLogAccordoVec[0]" id="elemento"
width="100%" styleClass="LISTA" styleClass2="LISTA2">
<layout:collectionItem title="form.useragg"
property="useragg" sortable="true" width="10%">
<bean:write name="elemento" property="useragg" />
</layout:collectionItem>
</layout:collection>
</logic:notEmpty>
</layout:pager>
當我只顯示一個子JSP,尋呼機工作正常(如果我點擊第二頁按鈕,它的工作原理)爲所有的子JSP。 當我在同一頁面上顯示更多的子JSP時,唯一工作的尋呼機是第一個子JSP(頂部的jsp)的尋呼機,當我點擊第一個子jsp的按鈕頁面2時,所有的子JSP都轉到第2頁(而不是第一個子jsp)。
我該如何解決?
這裏生成的HTML(我清理了一點,所以它的可讀性更強,只有相對於三代表的部分左起):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<tr>
<td bgcolor="#eaf3fa" colspan="8" class="testoGrassetto2"
style="text-align: center">Dati anagrafici dello straniero</td>
</tr>
<tr>
<td valign="top">
<div style="width: 100%; overflow-x: auto;">
<table cellspacing="0" cellpadding="0" border="0" align="CENTER"
width="100%" class="LISTA">
<tr>
<td valign="top"><table cellspacing="1" cellpadding="1"
border="0" width="100%">
<tr valign="top">
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=useragg&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>User agg.</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=dataagg&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Data agg.</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=operazione&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Operaz.</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=codicefiscale&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Codice fiscale</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=cognome&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Cognome</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=nome&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Nome</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=sesso&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Sesso</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=statocivile&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Stato civile</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=datanascita&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Data di nascita</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=descrizionenazionenascita&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Nazione di nascita</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=descittanascita&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Città di nascita</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=descrizionecittadinanza&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Cittadinanza di nascita</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=idrichiestaali&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>ID richiesta ALI</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=utenteali&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Utente ALI</td>
</tr>
</table>
</th>
<th class="LISTA" width="25%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=passwordali&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Password ALI</td>
</tr>
</table>
</th>
</tr>
<!-- HERE THERE'S THE DATAS, I HIDE THEM -->
</table>
</td>
</tr>
</table>
</div>
<table border="0" cellspacing="1" cellpadding="1" width="100%"
id="pager1380269837677">
<tr>
<td width="50%" style="text-align: right"></td>
<td>1 <a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=&layoutCollectionState=0&pagerPage=1&pagerSessionId=currentPageZERO">2</a> </td>
<td width="50%" style="text-align: left"><a
href="/AccordoIntegrazione/sort.do?layoutCollection=0&layoutCollectionProperty=&layoutCollectionState=0&pagerPage=1&pagerSessionId=currentPageZERO">>></a>
</td>
</tr>
</table></td>
</tr>
</body>
</html>
<tr>
<td> </td>
</tr>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<tr>
<td bgcolor="#eaf3fa" colspan="8" class="testoGrassetto2"
style="text-align: center">Dati di recapito</td>
</tr>
<tr>
<td valign="top">
<div style="width: 100%; overflow-x: auto;">
<table cellspacing="0" cellpadding="0" border="0" align="CENTER"
width="100%" class="LISTA">
<tr>
<td valign="top"><table cellspacing="1" cellpadding="1"
border="0" width="100%">
<tr valign="top">
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=useragg&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>User agg.</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=dataagg&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Data agg.</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=operazione&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Operaz.</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=comuneresidenza&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Comune di residenza</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=desprovinciaresidenza&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Provincia di residenza</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=indirizzoresidenza&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Indirizzo di residenza</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=numerocivicoresidenza&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Civico di residenza</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=capresidenza&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>CAP</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=telefono&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Telefono</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=email&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Email</td>
</tr>
</table>
</th>
</tr>
<!-- HERE THERE'S THE DATAS, I HIDE THEM -->
</table>
</td>
</tr>
</table>
</div>
<table border="0" cellspacing="1" cellpadding="1" width="100%"
id="pager1380269837836">
<tr>
<td width="50%" style="text-align: right"></td>
<td>1 <a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=&layoutCollectionState=0&pagerPage=1&pagerSessionId=currentPageONE">2</a> </td>
<td width="50%" style="text-align: left"><a
href="/AccordoIntegrazione/sort.do?layoutCollection=1&layoutCollectionProperty=&layoutCollectionState=0&pagerPage=1&pagerSessionId=currentPageONE">>></a>
</td>
</tr>
</table></td>
</tr>
</body>
</html>
<tr>
<td> </td>
</tr>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<tr>
<td bgcolor="#eaf3fa" colspan="8" class="testoGrassetto2"
style="text-align: center">Dati dei documenti e del permesso di
soggiorno</td>
</tr>
<tr>
<td valign="top">
<div style="width: 100%; overflow-x: auto;">
<table cellspacing="0" cellpadding="0" border="0" align="CENTER"
width="100%" class="LISTA">
<tr>
<td valign="top"><table cellspacing="1" cellpadding="1"
border="0" width="100%">
<tr valign="top">
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=useragg&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>User agg.</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=dataagg&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Data agg.</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=operazione&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Operaz.</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=destipodocumento&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Tipo documento</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=numerodocumento&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Numero documento</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=rilasciatoda&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Rilasciato da</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=datarilasciodocumento&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Data rilascio</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=datascadenzadocumento&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>data scadenza</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=duratapermessosoggiorno&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Durata permesso di soggiorno</td>
</tr>
</table>
</th>
<th class="LISTA" width="15%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=tiporichiestapermessosoggiorno&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Tipo richiesta permesso di soggiorno</td>
</tr>
</table>
</th>
<th class="LISTA" width="10%"><table border="0"
width="100%">
<tr>
<td><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=desprovinciaprefpermesso&layoutCollectionState=0"><img
src="/AccordoIntegrazione/config/sort.gif" border="0"
alt="sort">
</a>
</td>
<td>Provincia pref. permesso</td>
</tr>
</table>
</th>
</tr>
<!-- HERE THERE'S THE DATAS, I HIDE THEM -->
</table>
</td>
</tr>
</table>
</div>
<table border="0" cellspacing="1" cellpadding="1" width="100%"
id="pager1380269837911">
<tr>
<td width="50%" style="text-align: right"></td>
<td>1 <a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=&layoutCollectionState=0&pagerPage=1&pagerSessionId=currentPageTWO">2</a> </td>
<td width="50%" style="text-align: left"><a
href="/AccordoIntegrazione/sort.do?layoutCollection=2&layoutCollectionProperty=&layoutCollectionState=0&pagerPage=1&pagerSessionId=currentPageTWO">>></a>
</td>
</tr>
</table></td>
</tr>
</body>
</html>
但它和我一樣。你只是改變了一個變量名。 該代碼可以正常顯示子jsp。問題是隻有當我點擊分頁jsp的其他頁面 – Accollativo
我插入一個屏幕截圖。 – Accollativo