• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Best Practice of using JSTL + ScriptLet

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

I wrote the following jsp to display data from db.



Basically I have a Bean that stores bunches of array from other form, like String[] template_cust_seg. I want to display all the array by using JSTL. It's easy if it's just a object including many single elements. However, it's a single object wrapping many arrays, so I used the above way to handle the jsp. Please give me some good practice or suggestion to improve it, thanks

Transistor
[ December 06, 2006: Message edited by: YuenLian Wu ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The EL is perfectly capable of handing nested arrays. No need for scriplets.
 
YuenLian Wu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have the following scriptlet and I wish to convert it to JSTL.



Where trancheDetailsViewBeanis the Bean class and it stores a object called profitSharingSchemeMap. profitSharingSchemeMap is a Map that contains a list of values.

TrancheDetailsDataBean is another Bean class and it stores a string Array called profit_sharing_scheme. I tried to write the following JSTL code, but it failed. Please advise !!!

 
Bras cause cancer. And tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic