• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Search pages shows only limited no. of rows

Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search pages shows only limited no. of rows, say, if 10 results per page, it is able to show 70 records (7 pages) and if 30 per page (shows only once) and next page leads to error. Common error message appears.

Detail of the issue: I have designed a "search page" to search by providing some / all of the employee details from the database. Once I click on "Search" button, i submit the page with "get" method. On the result page, I have called the java class which talks to dao and get the results. I return the results to jsp as a list.

As of now I show only 10 results per page, and I have next button to proceed and back to previous results. I have added start and end positions on the request, so I use them to pick records from that counts. I have written a query to get only 10 records at a time. if I press next, (next is a href and i have dynamic link which takes start and end positions) jsp calls java which talks to dao and gets results again.

sample request query string:

Problem here is: Totally I'm getting 4000 records (used separate query to count records) and i show 10 records per page. I'm able to continue till 70th record and after that I get a message saying some error.

If I try for 30/page, the first search result page is coming and for next 31to60 error page is coming
If I try for 50, the first search result page itself is not coming

I logged all the steps and it looks like, list is getting populated from database, and size also says 30 records.
below is my log:

I'm not getting any clue to solve this. Is there any restriction to use links on page. because, i make first column as a link, so for 50 rows i would have 50 links. may be insane, but the same is working for 7 pages if i have 10results / page.

Thanks for your time.
Posts: 25677
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But you are getting a clue. It's in the error message at the beginning of your post, and this is what it says:

Please consult the application log for details.

So your Java class is throwing an exception for some reason. At this point that's all you know. So it's too early to start speculating about what might be wrong and how to fix it; the first thing to do is to find the reason. And as the error message implies, you should look in your server's log files. Most likely you will find a stack trace saying what exception was thrown and what line of code threw it. Start looking for that.
Dhamayanthi Karuppanan
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, There were errors. As there is no error handling in jsp, it was failing and writing to the application log. Thanks for pointing out!
    Bookmark Topic Watch Topic
  • New Topic