This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Best Practice of using JSTL + ScriptLet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Best Practice of using JSTL + ScriptLet" Watch "Best Practice of using JSTL + ScriptLet" New topic
Author

Best Practice of using JSTL + ScriptLet

YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
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

Joined: Jan 10, 2002
Posts: 60810
    
  65

The EL is perfectly capable of handing nested arrays. No need for scriplets.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
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.
 
subject: Best Practice of using JSTL + ScriptLet
 
Similar Threads
problem with JSTL
JSTL List Help
Coloring Table Rows
Implementation of google charts in JSP
JSTL - total count for loop within a loop