tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject Re: CRUD Operations using Tomcat
Date Tue, 20 Jul 2004 23:25:00 GMT
From: "Valter G. Nogueira Jr." <>
> I am looking for good ways to implements CRUD ops using Tomcat
> Having handcrafted jsp/servlets almost identicals seems to be not only
> boring, but an error prone aproach.

How are you doing it now?  Do you have JDBC code inside your Servlets?  I
use Struts, and on that users list we often get the same sort of question,
"How do I read and write records using Struts?"

The answer is the same-- you don't.  You do your data access in a separate
layer of code so that nothing in the Action [or Servlet] even knows that a
database exists.

There are several options available if you're using JDBC-- I think Hibernate
is one?  I wrote my own and followed the J2EE Data Access Objects pattern.
So in my Actions I have code along the lines of:
  Person person = "12345" );

Wendy Smoak

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message