This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See Servlet, which gets the detail and pass it back to same JSP in an array of Bean, type ClientUsers.
I get this error /opt/bea/user_projects/extDev/extDevSvrC1/.wlnotdelete/extract/extDevSvrC1_OAT_OAT/jsp_servlet/__cuaccount.java:198: cannot resolve symbol symbol : class userColl location: class jsp_servlet.__cuaccount userColl users = (userColl)request.getAttribute("userColl"); //[ /CUaccount.jsp; Line: 101] ^ How can I declare this array userColl as ClientUsers type. Bear with me for this fundamental question.
The useBean tag is for those of us who don't want scriptlets in their JSPs. Since you're doing everything with scriptlets anyway, don't bother with useBean. It can't handle arrays the way you were using it anyway.
There are some really nice tools (EL and JSTL) if your using a JSP 2.0 compliant container.
Try Googling with the keywords: SCRIPTLESS JSP and you will find quite a few articles. In my second page of examples http://simple.souther.us/not-so-simple.html there is a project called SessionMonitor. In it there is a JSP that does something very similar to what you are doing with your scriptlet. The page monitor.jsp uses JSTL and EL to iterate over an arrayList of beans and print the contents as an HTML Table.
Our esteemed moderator Bear Bibeault is a very strong advocate of scriptless JSPs and quite the Guru on the subject. He may have some good resource links for you.
The one thing I would try to avoid is mixing scriptlets with any of the mechanisms that are designed to eliminate them. If you are going to go scriptless, do it all the way (either with the older xml syntax or with JSTL and EL). If not, adding JSTL, EL, and the XML syntax tools to your JSPs only obfuscates them. One of the great strengths of Perl is the ability to write code in a variety of different syntactic styles. Perl's greatest weakness is that most of it's scripts are written in a variety of syntactic styles. It is now known as a "write-only" language because nobody can read anyone else's code. If we're not careful JSP is going to head down that same road.