Convert from Scriptlets to Struts-Tag-Library
[nobr]Hi..
This is my jsp code
I want to convert all the Scriptlets to become
<logic:iterate>
and
<bean:write>
but still failed...
The code below is run nicely
<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<html:base />
<title>Administrative Database</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<font size="2" face="Courier New">
<h1>Coretech Knowledge Inc.</h1>
<html:form action="/admin">
<html:text property="search" size="20"/><html:errors property="search"/>
<html:submit value="Search Data"/>
</html:form>
<table border=5>
<tr>
<th align=center bgcolor="#CC99FF"> ID </th>
<th align=center bgcolor="#CC66FF"> User Name </th>
<th align=center bgcolor="#CC33FF"> Password </th>
<th align=center bgcolor="#CC00FF" colspan="2"> Modification </th>
</tr>
<%
Object counterOb = request.getAttribute("counter" );
Object idOb = request.getAttribute("id" );
Object userdOb = request.getAttribute("userd" );
Object passdOb = request.getAttribute("passd" );
int counterd = ((Integer)(counterOb)).intValue();
String[] id = (String[])idOb;
String[] userd = (String[])userdOb;
String[] passd = (String[])passdOb;
for (int i=1; i < counterd+1 ; i++)
{
%>
<tr>
<td align=center><%= i %></td>
<td align=center><%= userd %></td>
<td align=center><%= passd[i] %></td>
<td align=center>
<a href="../preedit.do?no=<%=id[i]%>"> Edit </a>
</td>
<td align=center>
<a href="../delete.do?no=<%=id[i]%>"> Delete </a><br>
</td>
</tr>
<%
}
%>
</table>
</body>
</html:html>
Thank you before.....[/nobr]

