Kenneth P. Turvey wrote:
On Tue, 30 Oct 2007 19:40:38 -0400, Lew wrote:
Really he shouldn't have any imports in the JSP, because there
shouldn't be any scriptlet in the JSP.
Would you explain yourself here. I'm not sure I understand.
I've got very little code in the JSP at all, just a few method calls.
They are generating HTML to go in the page.
I could have used tag libraries, but they seemed like overkill at this
point. I am unlikely to be reusing the code.
As a general rule, and of course there are exceptions, JSPs should
contain only markup and custom tags, not direct scriptlet. Non-JSP
servlets and regular classes contain all the direct Java code.
Code in the JSP always makes trouble, to the point where I separate it
out even for small projects.
But your response shows that you know this already. I suspect I am not
answering your question, because I can't see that I'm telling you
anything that you don't already know.
that into the JSP as part of the model/request attribute.