Many thanks for the useful comments. Alas ${row.getOrderLineID}} shoudl have read ${row.orderLineID} as you correctly pointed out. This was one of my last ditched attempts to get it to work but didn't reverse it out. EL statements must omit get or set but the methods need to be in the class and use camel case etc. Should have known better.
Uncommented the code below to see if they would output in the JSTL code in the Checkout.jsp page.
I also modified the embedded java code to confirm that the Collection contained my test OrderLine objects as well as the ones added via the OrderFactory object.
The Tomcat log confirms that at the Checkout.jsp page, that the OrderFactory has returned an Order object with a list of OrderLine objects. It has also added the test OrderLine objects above.
org.me.HelloWeb.OrderLine@9ac0f5
org.me.HelloWeb.OrderLine@1f21c50
org.me.HelloWeb.OrderLine@20f237
org.me.HelloWeb.OrderLine@fe315d
org.me.HelloWeb.OrderLine@5aebd9
org.me.HelloWeb.OrderLine@132021a
Now what is interesting or fustrating is that the forEach JSTL code outputs the OrderLine objects created in the Order object method, but nothing to be seen of the ones created in the OrderFactory object. Despite knowing that they are there in the Collection.
I will update the code to use List
pattern throughout my code (thanks for that) and create a separate OrderFactory class that returns an Order object complete with an OrderLine Collection omitting the database element, just in case there is a data type to object translation problem.