<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld" 
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

<jsp:directive.page import="org.opengion.hayabusa.common.*,org.opengion.hayabusa.resource.*,org.opengion.hayabusa.db.*" />
<og:head />

<jsp:scriptlet>
	DBTableModel table = (DBTableModel)session.getAttribute( HybsSystem.TBL_MDL_KEY );
	String consisKey = (String)session.getAttribute( HybsSystem.TBL_MDL_CONKEY );
	// 3.8.1.1 (2005/11/21)
	if( table != null &amp;&amp; consisKey != null &amp;&amp; consisKey.equals( table.getConsistencyKey() ) &amp;&amp; table.getRowCount() &gt; 0 ) {
		UserInfo userInfo = (UserInfo)session.getAttribute( HybsSystem.USERINFO_KEY );
		String sql = userInfo.getAttribute( "LASTSQL" );
		boolean flag = ( sql == null || sql.indexOf( "call" ) &gt;= 0 ) ;
		if( table.isOverflow() &amp;&amp; ! flag ) {
			pageContext.forward( "query.jsp" );
		}
		else {
			pageContext.forward( "writeFileRedirect.jsp?filename=fileout.xls" );
		}
	}
	else {
</jsp:scriptlet>
<og:message lbl="ERR0028" />
<jsp:scriptlet>
	}
</jsp:scriptlet>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
