Are you getting an error? Can you share that with us?
Note: I don't know off-hand if you can do what you're trying to do or not, but the error you're getting may just tell us.
My advice is to choose to either use scriptlets (not recomeended) or to use the JSTL/EL. Mixing them is either going to be outright invalid, or a source of endless problems.
@Mark - The error I get is:
An error occurred at line: 12 in the jsp file: /WEB-INF/jsp/getLinks.jsp
Syntax error on tokens, delete these tokens
And like Bear said, I just can't embed an EL expression in scriptlets.
@Bear - I'm definitely trying to use JSTL/EL, but I still can't think of a way to look up the username with the userID I have in my JSTL loop. I'll keep thinking.
How can it be re-jiggered to fit better into an EL-focused page? Is it something that can set up in the page controller prior to even calling the page? Would an EL function be needed? A custom tag? Can it be the property of some bean?
And so on... creating modern JSP pages means thinking about them differently than when scriptlets were used.
One of the benefits you gain by having two separate task/page controller Servlets is the ease with which you can implement the Post Redirect Get (PRG) design pattern (if you haven't heard of this yet, it's in the FAQ).
I hope it's making more sense. It took me a little while to get the whole MVC, Page/Task Controller model through my thick skull, but once I did I was able to see the great benefits.
Mark E Hansen wrote:One of the benefits you gain by having two separate task/page controller Servlets is the ease with which you can implement the Post Redirect Get (PRG) design pattern (if you haven't heard of this yet, it's in the FAQ).
As well as this article!