%@ page import="com.gimmegrub.hibernate.HibernateUtil" %>
<%@ page import="org.hibernate.classic.Session" %>
<%@ page import="com.gimmegrub.hibernate.Restaurant" %>
<%@ page import="com.gimmegrub.hibernate.MenuCategory" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
Session hibSession = HibernateUtil.getSessionFactory().getCurrentSession();
hibSession.beginTransaction();
Restaurant restaurant = (Restaurant) hibSession.get(Restaurant.class, 127);
pageContext.setAttribute("restaurant",restaurant);
%>
| |
 |
|
|
|
 |
Order Your Food Online! Click Here
|
| |
<%String categoryName = ((MenuCategory)pageContext.getAttribute("category")).getName().toLowerCase().replaceAll(" ","").replaceAll("/","").replaceAll("!","");
pageContext.setAttribute("categoryName",categoryName);
if (!categoryName.equals("specials") && !categoryName.equals("vegetarian") && !categoryName.equals("hidden") && !categoryName.equals("catering")) {
%>
${category.name}
|
${item.name}
${item.descr}
.
|
/
|
|
|
______________________BACK TO THE TOP______________________
<%}%>
|
|
 |
|
|
|
<% hibSession.getTransaction().commit();%>