Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6332115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:12:02+00:00 2026-05-24T18:12:02+00:00

Currently I’m getting data in jsp using scriptlet but now want to use JSTL

  • 0

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

  1. User (user_id, username, password)
  2. Box (box_id, box_name,list_of_boxCat)
  3. 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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:12:02+00:00Added an answer on May 24, 2026 at 6:12 pm

    You should redesign or map your model so that it suits whatever your view needs. Does the view need a List<BoxCat> as a property of User or maybe BoxCat as a property of Box? If so, then make that so and change your controller and DAO to fill that beforehand.

    Otherwise you will end up in clumsy and potentially memory-inefficient workarounds using a mapping of the entities by their ID such as Map<Long, Entity>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I know of only two ways to cache data (I use PHP but
I want use html5's new tag to play a wav file (currently only supported
Currently It just opens up the xml, but i want to get a dialog
Currently I have this: var x = Convert.ToString(dateTimePicker2.Value.Subtract(dateTimePicker1.Value)); int xDays = Convert.ToInt32(x.Substring(0,1)); But it's
Currently, if I want to output a SQL script for a table in my
Currently, I am developing a product that does fairly intensive calculations using MS SQL
currently I'm developing an app for WP7 but came across a little problem with
Currently i'm having trouble using two functions in my -(void)viewDidLoad , both of these
Currently I have a date in my clients data table and it is stored
Currently I am using Amazon Cloudfront to service static objects on my ASP.Net MVC3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.