JSP Technology -- Friend or Foe?
By Brett McLaughlin2003-03-07
Content vs. presentation
out.println("<HTML><HEAD><TITLE>" + pageInfo.getTitle() + "</TITLE></HEAD>"); into their servlet code. This mixing of hard-coded content with runtime variables presented a horrible burden on servlet developers. It also made making even minor changes to the presentation layer difficult for the developer.JSP technology addresses this situation by allowing normal HTML pages (and later, WML or other markup language pages) to be compiled at runtime into a Java servlet, essentially mimicking the out.println() paradigm, without requiring the developer to write this code. And it allows you to insert variables into the page that are not interpreted until runtime.
In a JSP page the HTML snippet shown in Listing 2 could look like the example in Listing 3.
|
Judging by these initial principles, then, JSP technology (at least in its stated design) would satisfy the first tenet of a presentation technology, as outlined above: that content be separated from presentation.
First published by IBM developerWorks
|
|||||||||
You might also want to check these out:
|
Leave a Comment on "JSP Technology -- Friend or Foe?"
You must be logged in to post a comment.
Link to This Tutorial Page!

