I suggest to make the properties of the class HistoryLineItem private and provide getters and setters for each of them. (see JavaBeans specification)
Main Topics
Browse All TopicsI'm getting an error trying to access class attributes passed from my java class to my jsp page. Here's what I'm doing. Do you see the error of my ways?
Briefly, in Java Class 'TransferService':
public class TransferService
{
private ArrayList<HistoryLineItem>
public final ArrayList<HistoryLineItem>
<Query several TransferCount records, then loop through them>
ArrayList historyList = new ArrayList<HistoryLineItem>
for (TransferCount transferCount : q) {
HistoryLineItem hli = new HistoryLineItem();
hli.transferCountId = transferCount.getTransferC
hli.productNum = transferCount.getProductNu
hli.seq = transferCount.getSeq();
hli.qty = transferCount.getQty();
historyList.add (hli);
}
return this.historyList;
}
public final class HistoryLineItem {
public int transferCountId;
public String productNum;
public BigDecimal qty;
public short seq;
}
}
In my JSP, keeping it simple:
<c:forEach var="thisItem" items="${scannedHistoryLis
<srps:Control TargetName="TransferHistor
</c:forEach>
When executed, I get the following runtime error:
SEVERE: Servlet.service() for servlet SoftRetailMobileServer threw exception
javax.el.PropertyNotFoundE
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: rrz@871311Posted on 2009-07-21 at 18:23:09ID: 24910794
Does the HistoryLineItem class have a getter method ?
public BigDecimal getQty(){
return qty;
}