home *** CD-ROM | disk | FTP | other *** search
Wrap
package com.bitmechanic.gsp; import java.io.PrintWriter; public class ReloadTemplate implements Template { private long parseTime = System.currentTimeMillis(); public long getParseTime() { return this.parseTime; } public boolean shouldCache() { return false; } public boolean usesPrintWriter() { return true; } public void render(Application var1, GspRequest var2, GspResponse var3) throws Exception { String var4 = var2.getRequestURI(); if (var2.getPathInfo() != null) { var4 = var4 + "/" + var2.getPathInfo(); } if (var2.getQueryString() != null) { var4 = var4 + "?" + var2.getQueryString(); } PrintWriter var5 = var3.getWriter(); var5.print("<html><head><title>reloading</title><meta http-equiv=\"refresh\" content=\"0;\n" + var4 + "\"></head><body>this should reload in several seconds; or you can click <a href=\"" + var4 + "\">here</a>.</body></html>\n"); var5.flush(); } public void flushExpiredCacheData() { } public void flushAllCacheData() { } }