That's a good point Tim... I have to admit I've only used methods a couple of times in JSPs, generally preferring all the code be inline (except where there would be a lot of duplication, then I tend to make utility classes). You make a good point though, I may start getting into that habit myself :)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Tim Funk wrote:
Essentially you have written a servlet but packaged it as a JSP. Anytime it becomes a trivial effort to hand transform a JSP into a servlet usually means some refactoring is in order.

Personally I do not mind java code in JSP's but only if its structured. I try not to rely on in-line java code - but I try to use methods or inner classes for most java coding in a JSP. By doing that - it becomes easier to rip the methods and inner classes from the JPS page and into an independent object. By doing this - I get rapid turnaround - but don't code myself in a hole for when new functionality might be needed that might overlap existing pages.

-Tim

Dola Woolfe wrote:

I just read this thread and didn't quite understand
it. If it means what it seems to mean on the surface,
I'm doing everything wrong.

Schematically, my typical JSP page looks like the
following (basically 100% code). Is this what Craig is
advising against?

<%@ page errorPage="ErrorPage.jsp" import="html.*"%>
<[EMAIL PROTECTED] file="InitializePage.jsp"%>
<%
    Table table = new Table()
    .pAddH("#").pAddH("Action").pLN()
    .pAddC("1").pAddL(new Anchor("HelloPage.jsp", "Say
hello to my friend.")).pLN()
    .pAddC("2").pAddL(new Anchor("GoodByePage.jsp",
"Say good bye to my friend")).pLN()
;

    MyTemplate template = new MyTemplate ("Main
Actions", table);
    Page pAgE = new Page(new MyHead("Data Tools"), new
Body(template));
%>

<%= pAgE %>


__________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]









---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to