//@file TemperatureTable.jsp /nodynamiccopyright/ hard coded linenumbers in other tests - DO NOT CHANGE import java.io.*; import java.util.*; // import javax.servlet.*; // import javax.servlet.http.*; public class TemperatureTableServlet /* extends HttpServlet */{ public static void main(String[] args) { // public void doGet(HttpServletRequest request, HttpServletResponse response) // throws IOException, ServletException { HelloWorld.main(args); // so we can we non-JSP code too PrintStream out = System.out; // response.setContentType("text/html"); // PrintWriter out = response.getWriter(); //@line 1 out.println(""); //@line 2 out.println("
"); //@line 3 out.println("American tourists visiting Canada can use this handy temperature");
//@line 9
out.println("table which converts from Fahrenheit to Celsius:");
//@line 10
out.println("
");
//@line 11
out.println("");
//@line 12
out.println("
Fahrenheit | "); //@line 15 out.println("Celsius | "); //@line 16 out.println("
---|---|
" + i + " | "); //@line 21 out.println("" + ((i - 32) * 5 / 9) + " | "); //@line 22 out.println("
Created " + new Date () + "
"); //@line 27 out.println(""); //@line 28 out.println(""); //@line 29 out.println(""); } }