Is it possible to put a scriptlet inside the href attribute of a <a> tag?
luisa torress
Greenhorn
Joined: May 17, 2009
Posts: 3
posted
0
I have the following code
I wanna pass the movieid parameter to another JSP in this case addToQueue.jsp. But I'm not getting it to work.
On the addToQueue.jsp I have this, but is printing blank.
But violates best practices. Scriptlets should no longer be used in JSPs. The JSTL and EL are more appropriate choices.
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1005
posted
1
And I guess while we're talking best practice, it would be worth noting that SQL code doesn't belong on a JSP page either.
You should never be dealing with a result set object in a JSP.
Write a bean method that runs the query and copies the result into a List of beans.
Your JSP page can then iterate over that list.