cross table sheet database query (JSP)