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 971345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:57:02+00:00 2026-05-16T02:57:02+00:00

I have written my jsp using <display:table> to display search results. The <display:table> requires

  • 0

I have written my jsp using <display:table> to display search results. The <display:table> requires a javabean list to be passed in as an argument. Currently a controller will build the list, then the jsp displays it.

My concern is that what happen if 1000 users perform search at a time. That means all results will need to be loaded to memory as different javabean lists for <display:table> to display. The system will possibly crash because of running out of memory. Is there good strategies to prevent the system running out of memory? Is there a way in application level to limit the number of users to load the application? Would it mean using <display:table> is a bad programming practice since all records have to be loaded into memory at once? Thanks in advance.

  • 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-16T02:57:02+00:00Added an answer on May 16, 2026 at 2:57 am

    This is a very valid concern. You shouldn’t unnecessarily allocate memory. Displaytag unfortunately doesn’t support pagination at database level. Everything has to be loaded into Java’s memory first. The most memory efficient approach is obviously to store only the data in memory which the enduser is going to see and fire a new HTTP request to the server to retrieve exactly those new rows from the DB on every button click.

    No other JSP based pagination tag which does that comes to mind. If you were using JSF, I would have recommended PrimeFaces’ <p:dataTable dynamic="true"> for this. You still have to write code which is retrieving exactly the particular rows from the DB. But this isn’t that hard when you’re using Hibernate and/or JPA.

    In “plain vanilla” JSP/JSTL you have to do a bit more work. Basically, you need to provide a bunch of buttons which will modify the value of firstrow and invoke action to retrieve the data from DB accordingly. I’ve answered this in detail before in this topic: ResultSet to Pagination.

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

Sidebar

Related Questions

I have an enterprise application written in JAVA with JSF (using RichFaces 3.3). Currently
in sign.jsp , I have written the following so that, if a user is
I have written a program using Microsoft Visual C# 2010 Express. I need to
I have written two JSP pages: outerPage.jsp and innerPage.jsp . The outerPage.jsp includes innerPage.jsp
I have written a jsp redirect in my jsp page like this <s:if test=#session.Doctor
I have written web apps with JSP in the past. Now, I'm getting started
We have a large existing website (written in Java/Spring/Hibernate/JSP) and want to add a
I have been trying to display a MySQL table for some time and I
I have created an index.jsp as the start page in an Eclipse project using
I'm using Struts2, Spring, and Hibernate. I have written a simple Excel file called

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.