This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem in displaying table using struts logic:iterate tag

 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am Ujjwal B Soni. I have problem in my website. The problem is that, i am able to display the contents of the database correctly on my jsp page using the logic:iterate tah but the problem i am facing is that when i refresh my jsp page. The page displays multiple records. Please help me

The code is as under

(jsp page)

<table width="650">
<logic:iterate id="cl" name="completeList">

<tr>
<td><font color="blue" size="10"><bean:write name="cl" property="subject"/></font><br><br>
<b><h2 class="title"><font color="black" size="3"><bean:write name="cl" property="content"/></font></h2></b>
</td>
<td>     </td>







</tr>

<tr>

<td><h3 class="title"><font color="silver">Posted By <bean:write name="cl" property="name"/> On <bean:write name="cl" property="date"/></font></h3></td>
<td>     </td>
<td><font color="silver"><bean:write name="cl" property="email"/></font></td>

<td>     </td>
<td><a href="">Comments</a></td>

</tr>
</logic:iterate>

</table>


Cheers,

Ujjwal B Soni
(+919898954428)
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like the size/number-of-elements in your collection is different between when the page is navigated to the first time, and when the page is (later) refreshed. This is a function of the actions which are forwarding to this page. You might want to have a look at any and all actions which access the collection "completeList". Sorry that's the best I can do... Good luck.
-Jim
 
What's wrong? Where are you going? Stop! Read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic