Hi Xiu, no example, but a clear info copied from Marty Halls older Servlet book, which does not cover the newest specs, but which you can get for free from the Internet: http://pdf.coreservlets.com/ The following is from chapter7, page 3. I think the book is good, especially didactically. (for me they could have used overloading either, but so the name of Data Type is part of the method name.) Hall: " In addition to the general-purpose setHeader method, HttpServlet-Response also has two specialized methods to set headers that contain dates and integers: • setDateHeader(String header, long milliseconds) This method saves you the trouble of translating a Java date in milliseconds since 1970 (as returned by System.currentTimeMillis, Date.getTime, or Calendar.getTimeInMillis) into a GMT time string. • setIntHeader(String header, int headerValue) This method spares you the minor inconvenience of converting an int to a String before inserting it into a header."
Axel [ January 10, 2002: Message edited by: Axel Janssen ]
Let's get him boys! We'll make him read this tiny ad!
Devious Experiments for a Truly Passive Greenhouse!