Jon said:
Struts is the "industry standard". It is quite low-level and thus flexible.
Struts is not flexible. It forces you to extends its several Action
classes. Thus you cannot have a super abstract Action class in your web
application for common processing.
For advanced queries and manual transaction handling it (JDBC) may be more suited than using a higher-level framework like Hibernate.
JDBC is too low-level and error-prone. Programmers may forget to close
the connection in exception handling. You can try iBATIS from Apache,
which gives you almost full control of SQL command that is configured
in an XML file with placeholder parameters. So if you in the future
would like to change the order of the parameters (such as for
performanc purposes), you don't even need to change your code. If you
use JDBC directly, you may hard-code the order of the parameters and
thus need to change you code in those cases.
you have the opportunity to take advantage of container-managed transactions (even if you only use session beans with plain jdbc programming).
You can do J2EE without the overhead of EJB and an expensive
application server. You just need a web container, such as Tomcat, if
you use Spring. It is really good and also provides declarative
transaction management superior to EJB. It allows you to specify
whether to rollback a transaction or not based on the class of the
exceptions. Thus you may choose to rollback a transaction on a data
access exception but not on an illegal argument exception.
If you choose to use EJB you can also use Entity Beans to access the database. People tend to avoid Entity Beans because they're difficult to configure and can have
performance issues, but that's not always the case.
Entity Beans' notorious n+1 finder method is hard to avoid, you have to
read the application servers manual carefully to optimise this. Why
bother? Use Hibernate or iBATIS...
Also please read the two books of Rod Johnson (Spring's founder). EJB
is designed by committee, and has largely failed, while Spring,
Hibernate and iBATIS became popular because they are actually used by
people in the industry...