Jim Preston wrote:
> Well, I'm curious as to why you think using an include to do
> what you want is kludgy and error prone. I guess I could
> maybe understand why you'd think it was a little kludgy if
> the code in question doesn't have anything to do with what's
> on the JSP, but what's error prone about it?

I'm not worried about the fact that the code doesn't have anything to do
with what's on the JSP.  I think it's kludgy and error-prone to have to
remember to put "<jsp:include begin.jsp />" at the top and "<jsp:include
end.jsp />" at the bottom of *every* JSP file I create.  I feel that that
it's kludgy because it clutters up every one of my JSP files.  It's
error-prone because it's easy to forget to put either the begin or end
include in one of the JSPs.

> In any case, why don't you just put your code in a method in
> a bean and then call that method from the JSP?
>     ...
> Or you don't even have to make it a bean...

Whether I do <jsp:include>, <%@ include%> or <% foo.bar() %>, I still have
to remember to do it at the top and bottom of every JSP file.  I'm trying to
avoid that if possible.

--
Stephen A. Williams
HNC Telecommunications Solutions

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to