The exact same way you would with JSF, or JSP/Servlets, or EJB3, or Swing. You layer your application so that you have at least a UI layer, a DAO layer, and a Data Model layer. In all web frameworks, the work is 99% of the time on the server side. So the code will reside on the server side end. As far as dir structure. keep it modularized.
In terms of where to put the .hbm files it is also the same in all Hibernate apps.