tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Ng" <woonb...@yahoo.com>
Subject Servlet/JSP design,standard and guidelines, please help
Date Sat, 02 Mar 2002 06:52:15 GMT
Hi guys

I need to noe how u guys design yr servlet/jsp for lets say displaying a
search result
for e.g. the normal way would be embedding all the code within a jsp page

connectionBean is a javabean to connect to database..

<%
//inistialise connection bean ...
//pseudo code... declare resultset and stuffs...
//rs= connectionBean.executeQUery()....
//while rs.next(){
%>
 <%=rs.getString("id");%>
 <br>
 <%=rs.getString("name");%>
<%
}
//.....................
>%



Yes, i do use a servlet as a controller for all my jsp pages and most of my
logic up to now are in servlets
but how shd i keep my logic in such cases?(displaying rs result) or shd i
pass RS to my jsp from servlet as request.setAttribute("rs",rs) instead? or
even create a javabean to hold the logic? Im not too good at designing the
pattern so i reli need yr opinion on which is the better , practical design
method.



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message