You should use a
model 2 MVC architecture. Strongly recommend you to read any article on
J2EE MVC
pattern:
MVC design pattern Also,sugge as sted, google for "J2EE MVC"
commercial code: Use some of the frameworks which uses this MVC 2 architecture like
Struts (request based),
JSF or Tapestry (component based) for this purpose. If it is a new application, my recommendation is Tapestry or JSF. The above mentioned frameworks give you
the controller and the view.
For model you can use O-R mapping tool like Hibernate along with EJB session beans.
If you could provide more info like where you are going to use XSLT, Is it a commercial project or a practice project etc, ranchers can guide you a bit better.