T
Tyler Durden
Hi everybody,
I'm using Struts 2.
I have a simple jsp page that must show this:
[A small form to add a new user to db]
[A list of current users (a very small list, around 5 rows in db)]
I read the list from db and store it as "allUsers" in request. Here's
my jsp code:
The code for the small Add User form:
------------------------------------------------------
<html:form action="/addUser" focus="username">
<TABLE border="0" style="border-style: dotted; border-
width: 1" title="Enter new user information" width="179">
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Username:</Td>
<TD align="right"><html:text property="username"
tabindex="1"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Password:</Td>
<TD align="right"><htmlassword property="password1"
redisplay="false" tabindex="2"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Confirm Password:</
Td>
<TD align="right"><htmlassword property="password2"
redisplay="false" tabindex="3"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Name:</Td>
<TD align="right"><html:text property="name"
tabindex="4"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="130">Surname:</Td>
<TD align="right"><html:text property="family"
tabindex="5"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="130">Email:</Td>
<TD align="right"><html:text property="email"
tabindex="6"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="130">Group:</Td>
<TD align="right"><html:text property="group"
tabindex="7"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
</TABLE>
</html:form>
<table>
<tr>
<td nowrap="" align="left">
<html:errors/>
</td>
</tr>
</table>
--------------------------------------------------------------------------------------
And the code for populating a table with current users information:
--------------------------------------------------------------------------------------
<table border="1">
<tr>
<td>Username</td>
<td>Name</td>
<td>Surname</td>
<td>Email</td>
<td>Group</td>
<td>Last Login</td>
</tr>
<logic:iterate id="userinfo" name="allUsers">
<tr>
<td><bean:write name="userinfo" property="username"/></
td>
<td><bean:write name="userinfo" property="name"/></td>
<td><bean:write name="userinfo" property="family"/></
td>
<td><bean:write name="userinfo" property="email"/></
td>
<td><bean:write name="userinfo" property="group"/></
td>
</logic:iterate>
</table>
--------------------------------------------------------------------------------------
And here's the problem:
The out put page is not rendered completely and I just get it until
the second row of my Add User form!!!! I'm confused!
1. What does my form has to do with a table that is coming after it?
2. Why the table is not rendered?
Here's the output html:
--------------------------------------------------------------------------------------
<form name="addUserForm" method="post" action="/herb1.0/
addUser.do">
<TABLE border="0" style="border-style: dotted; border-
width: 1" title="Enter new user information" width="179">
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Username:</Td>
<TD align="right"><input type="text" name="username"
tabindex="1" value=""></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Password:</Td>
<TD align="right"><input type="password"
name="password1" tabindex="2" value=""></TD>
</TR>
<
--------------------------------------------------------------------------------------
It's just truncated after the second row of the form.
I'm stuck. I'd greatly appreciate if someone give me a clue.
Thanks.
I'm using Struts 2.
I have a simple jsp page that must show this:
[A small form to add a new user to db]
[A list of current users (a very small list, around 5 rows in db)]
I read the list from db and store it as "allUsers" in request. Here's
my jsp code:
The code for the small Add User form:
------------------------------------------------------
<html:form action="/addUser" focus="username">
<TABLE border="0" style="border-style: dotted; border-
width: 1" title="Enter new user information" width="179">
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Username:</Td>
<TD align="right"><html:text property="username"
tabindex="1"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Password:</Td>
<TD align="right"><htmlassword property="password1"
redisplay="false" tabindex="2"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Confirm Password:</
Td>
<TD align="right"><htmlassword property="password2"
redisplay="false" tabindex="3"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Name:</Td>
<TD align="right"><html:text property="name"
tabindex="4"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="130">Surname:</Td>
<TD align="right"><html:text property="family"
tabindex="5"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="130">Email:</Td>
<TD align="right"><html:text property="email"
tabindex="6"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="130">Group:</Td>
<TD align="right"><html:text property="group"
tabindex="7"/></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
</TR>said:<html:reset value="Clear" tabindex="8"/></td>
</TABLE>
</html:form>
<table>
<tr>
<td nowrap="" align="left">
<html:errors/>
</td>
</tr>
</table>
--------------------------------------------------------------------------------------
And the code for populating a table with current users information:
--------------------------------------------------------------------------------------
<table border="1">
<tr>
<td>Username</td>
<td>Name</td>
<td>Surname</td>
<td>Email</td>
<td>Group</td>
<td>Last Login</td>
</tr>
<logic:iterate id="userinfo" name="allUsers">
<tr>
<td><bean:write name="userinfo" property="username"/></
td>
<td><bean:write name="userinfo" property="name"/></td>
<td><bean:write name="userinfo" property="family"/></
td>
<td><bean:write name="userinfo" property="email"/></
td>
<td><bean:write name="userinfo" property="group"/></
td>
</tr>said:</td>
</logic:iterate>
</table>
--------------------------------------------------------------------------------------
And here's the problem:
The out put page is not rendered completely and I just get it until
the second row of my Add User form!!!! I'm confused!
1. What does my form has to do with a table that is coming after it?
2. Why the table is not rendered?
Here's the output html:
--------------------------------------------------------------------------------------
<form name="addUserForm" method="post" action="/herb1.0/
addUser.do">
<TABLE border="0" style="border-style: dotted; border-
width: 1" title="Enter new user information" width="179">
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Username:</Td>
<TD align="right"><input type="text" name="username"
tabindex="1" value=""></TD>
</TR>
<TR style="border-style: dotted; border-width: 0px">
<Td align="left" nowrap width="80">Password:</Td>
<TD align="right"><input type="password"
name="password1" tabindex="2" value=""></TD>
</TR>
<
--------------------------------------------------------------------------------------
It's just truncated after the second row of the form.
I'm stuck. I'd greatly appreciate if someone give me a clue.
Thanks.