Added webapp to tutorial

git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@8623 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Christian Bauer 2005-11-18 22:56:47 +00:00
parent 093a3b9d10
commit 1ebf3f95e5
1 changed files with 5 additions and 3 deletions

View File

@ -1303,7 +1303,9 @@ public class EventManagerServlet extends HttpServlet {
HibernateUtil.getSessionFactory() HibernateUtil.getSessionFactory()
.getCurrentSession().getTransaction().rollback(); .getCurrentSession().getTransaction().rollback();
throw new ServletException(ex); throw new ServletException(ex);
}}]]></programlisting> }
}]]></programlisting>
<para> <para>
The pattern we are applying here is called <emphasis>session-per-request</emphasis>. The pattern we are applying here is called <emphasis>session-per-request</emphasis>.
@ -1367,8 +1369,8 @@ out.flush();
out.close();]]></programlisting> out.close();]]></programlisting>
<para> <para>
Granted, this coding style with a mix of Java and HTMl would not scale Granted, this coding style with a mix of Java and HTML would not scale
in a bigger application&mdash;keep in mind that we are only illustrating in a more complex application&mdash;keep in mind that we are only illustrating
basic Hibernate concepts in this tutorial. The code prints an HTML basic Hibernate concepts in this tutorial. The code prints an HTML
header and a footer. Inside this page, an HTML form for event entry and header and a footer. Inside this page, an HTML form for event entry and
a list of all events in the database are printed. The first method is a list of all events in the database are printed. The first method is