JSP: Exemple d’utlidation de Scriplet

Author:

<%@ page import="java.text.*" session="false"%>


Scriptlet Example




   Fahrenheit
   Celsius

<%
   NumberFormat fmt = new DecimalFormat("###.000");
   for (int f = 32; f <= 212; f += 20) {
      double c = ((f - 32) * 5) / 9.0;
      String cs = fmt.format(c);
%>
   
      <%= f %>
      <%= cs %>
   
<%
   }
%>





           
              

Leave a Reply

Your email address will not be published. Required fields are marked *