[thelist] JSP Help

Wayne wayne at freelance-developer.co.uk
Tue Feb 1 13:28:26 CST 2005


I thought that JSP code was parsed into servlets which look similar to the first example anyway?

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Hassan Schroeder
Sent: 01 February 2005 17:04
To: thelist at lists.evolt.org
Subject: Re: [thelist] JSP Help


RUST Randal wrote:

> Just for my own edification, how should it be done then?

Separation of data, presentation and logic (the MVC pattern) would
say just put that in *as HTML*. Your example had *no* variable data
within it at all, which makes it even worse :-)

Why have, for instance, this:

<%
   StringBuffer buf = new StringBuffer();

   buf.append("<table>");
   buf.append("<thead>");
   buf.append("<tr>");
   buf.append("<th>Check Number</th>");
   buf.append("<th>Payment Date</th>");
   buf.append("<th>Check Amount</th>");
   buf.append("<th>Payment Type</th>");
   buf.append("<th>Status</th>");
   buf.append("<th>In Letter</th>");
   buf.append("<th>Check Details</th>");
   buf.append("</tr>");
   buf.append("</thead>");
   buf.append("</table>");	
			
   out.println(buf.toString());	
%>

to simply create
<table><thead><tr><th>Check Number</th> .... when you can do it
directly? (and use the validation, syntax highlighting, etc. of
your preferred tool set, as well)

The whole *point* of JSP is to remove the need for things like that
first example...

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list