Drawing Hands by M.C. Escher (1948)

Jeff Mesnil


Procedural Programming and #include in Java

On July 13th, 2004 in java

Question: How do you get procedural programming and #include in Java?

Answer: You just have to create a JSP file of 2000 lines containing only Java functions and include it in every other JSP page.

This is MVC model 1 at its ugliest…

2 Responses to “Procedural Programming and #include in Java”

  1. Anonymous Says:

    I thought Model 2 was MVC JSP/Servlets, and Model 1 wasn’t MVC at all.

    IIRC, there’s a JSP feature to set the base class of the JSP. Put all your 2000 lines into that base.

    Presumably the next version of JSP, will include JDK5.0’s static import. Actually, can’t you use the latest JSP spec’s tags?

  2. jmesnil Says:

    My mistake, Model 1 is obviously not MVC.
    Unfortunately I’ve to maintain a legacy application which was written a long time ago and I’m stuck with GNUJSP and JSP 1.0.
    It’s quite amazing to see how web applications were written 4 or 5 years ago (Model 1, no framework, business logic in the JSP,…). If I could have developped the application today, I could have get rid of this ugly 2000-lines JSP…