Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

struts 1.2, Display result list based on the index

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm using struts 1.2,

Let me know, how the below case can be achieved,

Let say,

I have retreived records from the database .. (100 count)

and I need to display records that are available at the index between 20 and 35


How this can be configured/achieved at JSP ?!! instead of handling the list at java code







 
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijay,
If you do not want to use the rest of the records for any reason/processing I would prefer to filter the list at DB level itself using 'rowcount'.
 
Vicky Vijay
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shankar,

I need more of filtering the data at VIEW Level i.e., JSP tags

Is there any JSTL / STRUTS tag to accomplish this kind of scenario ?
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijay,
I really do not know what your requirement is, I cant even guess what it could be due to the number 20 & 35 being odd
However, to my knowledge i do not know any available JSTL libraries which can only pick the records from the given index but there are few libraries/taglibs which does more than that. Have you looked into display table and other pagination frameworks available. Even if your requirement is not paginating you can still customize these tags or get an idea on how to implement your custom tag library.
Anyways, if you could shed more details about the business requirement, you might get better and more resolutions.
 
Vicky Vijay
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your suggestion.



This was the question posted to me by my manager...

that number are just start index (20)... and end index (35)... of the display list...

There is no logic behind these numbers...
 
reply
    Bookmark Topic Watch Topic
  • New Topic