if ("POST".equals(request.getMethod())) {
Configuration cfg = hibernateUtil.getConfiguration();
new SchemaExport(cfg).drop(false, true);
new SchemaExport(cfg).create(false, true);
request.getSession().addMessage("Tables created successfully");
return new HttpResponseRedirect("..");
}
Map<String, Object> context = new HashMap<String, Object>();
context.put("page_title", "Are you sure?");
return renderToResponse("/javango/contrib/admin/templates/confirm_reset_db.ftl", context);