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…
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…
July 16th, 2004 at 20:07
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?
July 16th, 2004 at 21:04
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…