Currently I'm getting data in jsp using scriptlet but now want to use JSTL so I'm trying to convert my scriptlet code to JSTL. But for following scenario I don't know how to get data in jstl.
Let me explain by example:
There are 3 objects
- User (user_id, username, password)
- Box (box_id, box_name,list_of_boxCat)
- BoxCat (box_cat_id,box_id,user_id,cat_name)
Now I need to display list of boxes a user own. So i have created a list of Box objects by firing query in servlet and pass that list in jsp in request attribute then access it in jsp. Until this everything goes fine. But now I have to access BoxCat object which do not have any reference from Box object directly. To get BoxCat object I have to combine Userid and Box id and then I can get BoxCat id. So in scriptlet I call my DAO and get list by running query. But I don't know how to do this JSTL. Anyone please help me on how to do this?