• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

help in JSP

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mukesh you posted in wrong place. Post your query in JSPs category
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JSTL <c:forEach> tag will allow you to iterate through the List.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic