File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best Practice of using JSTL + ScriptLet

 
YuenLian Wu
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EL is perfectly capable of handing nested arrays. No need for scriplets.
 
YuenLian Wu
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • 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 !!!

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic