Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ManageAccounts extends HttpServlet{
- @Override
- protected void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- SessionFactory factory = HibernateUtil.GetSessionFactory();
- Session hibernateSession = factory.openSession();
- Transaction tx = null;
- List<AccountTypes> accountTypesList = null;
- try {
- tx = hibernateSession.beginTransaction();
- accountTypesList = hibernateSession.createQuery("FROM AccountTypes").list();
- for (Iterator iterator = accountTypesList.iterator(); iterator.hasNext(); ) {
- AccountTypes accountTypes = (AccountTypes) iterator.next();
- }
- tx.commit();
- } catch (HibernateException e) {
- if (tx != null) tx.rollback();
- e.printStackTrace();
- } finally {
- hibernateSession.close();
- }
- }
- <div class="row text-right">
- <label>
- Show
- <select name="cls" id="cls">
- </select>
- </label>
- </div>
- <div class="row">
- <label>
- Show
- <select name="group" id="group">
- </select>
- </label>
- </div>
Add Comment
Please, Sign In to add comment