Struts: JSP page renders incomplete!

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"><html:password 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"><html:password 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">
said:
<html:reset value="Clear" tabindex="8"/></td>
</TR>

</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>
said:
</tr>
</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.
 
T

Tyler Durden

Please, please, please, please, please do not top-post.

TylerDurdenwrote:

No, I do not mean that. I mean,


You could check your code and see what the answer is. You could try things to
see if they work. I do not know enough if changing the tags will help. For
one thing, I don't know the answer to the question I asked, since for some
reason you didn't answer it.

Oops, sorry for the top-post.
About the code. The fact is that I'm new to struts, so I really don't
know how to use those new tags, but I will learn. For now, my problem
is solved. I just moved my data table to the top of the page and form
to the bottom and now it works!! :O
I'll look for the reason.
Thanks anyway. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top