package _gsp;
import com.bitmechanic.gsp.*;
import javax.servlet.http.*;
import com.bitmechanic.util.*; //i:\os2httpd\public\htdocs\gsp\simple_test.gsp:4
import java.util.Date; //i:\os2httpd\public\htdocs\gsp\simple_test.gsp:5


public class ___simple_test implements Template {
  private static String __strArr[] = {
    "<html><head><title>test</title></head>\n<body><h1>test</h1>\n",
    "\n",
    "\n\n</body></html>\n",
  };
	private static char[][] __byteArr;
	static {
	  __byteArr = new char[__strArr.length][];
	  for(int i = 0; i < __strArr.length; i++) {
	    __byteArr[i] = __strArr[i].toCharArray();
	  }
	  __strArr = null;
	}
	//note current time for comparisons latter
	private static long __parseTime = Long.parseLong("942719342615");
	private static com.bitmechanic.gsp.FileDependancy __dependancies[] = {  
		new com.bitmechanic.gsp.FileDependancy ("i:\\os2httpd\\public\\htdocs\\gsp\\simple_test.gsp","907433762000")};
	public boolean usesPrintWriter() {
		return true;
	}
	public boolean shouldCache() {
		boolean __shouldCache = true;
		for (int i = 0; i < __dependancies.length && __shouldCache; i++) {
			if (!__dependancies[i].isCurrent())
				__shouldCache = false;
		}
		return __shouldCache;
	}

	public long getParseTime() { return this.__parseTime; }
	private java.util.Hashtable __cacheHash = new java.util.Hashtable();
	public synchronized void flushExpiredCacheData() {
	  if(__cacheHash != null) {
		long now = System.currentTimeMillis();
		for(java.util.Enumeration e = __cacheHash.keys(); e.hasMoreElements();) {
			Object key = e.nextElement();
			CachedString cs = (CachedString)__cacheHash.get(key);
			if(cs.hasExpired(now)) __cacheHash.remove(key);
		}
	  }
	}
	public synchronized void flushAllCacheData() {
	  if(__cacheHash != null) {
		__cacheHash.clear();
	  }
	}


	public ___simple_test () {}

	public void render(Application application, GspRequest request, GspResponse response) throws Exception {
		CachedString __cacheString = null;
		String __cacheKey = null;
		java.io.PrintWriter out = response.getWriter();
	out.write(__byteArr[0]);
	out.write(__byteArr[1]);
		__cacheKey = "0";
		__cacheString = (CachedString)__cacheHash.get(__cacheKey);
		if(__cacheString == null || __cacheString.hasExpired(request.getRequestTime())) {
		  StringBuffer cacheBuffer = new StringBuffer(1024);
 //i:\os2httpd\public\htdocs\gsp\simple_test.gsp:7
	Date cacheDate = new Date(); //i:\os2httpd\public\htdocs\gsp\simple_test.gsp:8
        cacheBuffer.append("Last cache update: " + cacheDate); //i:\os2httpd\public\htdocs\gsp\simple_test.gsp:9
		 __cacheString = new CachedString(cacheBuffer.toString(), 60000);
		 __cacheHash.put(__cacheKey, __cacheString);
		}
		out.print(__cacheString.toString());
	out.write(__byteArr[2]);
		out.flush();
	}
}
