You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Keith Ng <wo...@yahoo.com> on 2002/03/02 07:52:15 UTC

Servlet/JSP design,standard and guidelines, please help

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:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>