Update of /cvsroot/tbase/applications/adfundum/src/adfundum/view/components
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5237/src/adfundum/view/components
Added Files:
AFTime.java
Log Message:
--- NEW FILE: AFTime.java ---
package adfundum.view.components;
import java.io.IOException;
import java.util.Date;
import java.util.Hashtable;
import java.text.SimpleDateFormat;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.tbase.html.TemplateParser;
public class AFTime extends TemplateParser {
public void doRequest(HttpServletRequest request, HttpServletResponse response)
throws IOException
{
Hashtable<String,String> fields = new Hashtable<String,String>();
Date today = new Date();
SimpleDateFormat formatter;
formatter = new SimpleDateFormat("H");
fields.put("hour", formatter.format(today));
formatter = new SimpleDateFormat("mm");
fields.put("min", formatter.format(today));
formatter = new SimpleDateFormat("ss");
fields.put("sec", formatter.format(today));
setFields(fields);
parsePart("time");
}
}
|