Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help in JSP

 
Mukesh Dubey
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a bean like this:

class WorkOnExpense{
private String inventory;
private Double amount;
private String check;
private String voucher;
private List items;
private List accountNo;
}

and i am setting all this values after getting it from datbase.

Now i am able to print values of inventory, amount check in jsp page but not able to print List type properties. How to print this using <logic:iterate> or using nested tag.

for printing other values i am writing like this

<jsp:useBean id="workOnExpenseVO" type="com.ci.prize.view.vo.releaseexpense.WorkOnExpenseVO" scope="session"/>

<bean:write name="workOnExpenseVO" property="amount" />

and i am getting the list also using this.

<bean:write name="workOnExpenseVO" property="items" />
Now how can i iterate this list and print all the values in jsp page.


Please help me on this..

Thanks in advance!!

Mukesh.
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mukesh you posted in wrong place. Post your query in JSPs category
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSTL <c:forEach> tag will allow you to iterate through the List.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic