Perl usrbinperl openHTM textsample html die whileHTM print
Perl #!/usr/bin/perl open(HTM, "/text/sample. html") || die "Файл не найден!"; while(<HTM>){ print; } close(HTM);
PHP n Первая версия 1995 г. Расмус Лердорф (Rasmus Lerdorf) РНР 2. 0, или PHP-FI (Personal Home Page — Form Interpretator) РНР 3. 0, 1997 г. РНР 4. 0, 1999 г. РНР 5. 0 n РНР Hypertext Processor n n
Примеры PHP кода <TABLE> <? php for($i=1; $i<=10; $i++){ ? > <TR> <? php for($j=1; $j<=10; $j++){ ? > <TD> <? php print $i*$j ? > </TD> <? php } } ? >
Сервлеты import java. io. *; import javax. servlet. http. *; public class Hello extends Http. Servlet { public void do. Get(Http. Servlet. Request request, Http. Servlet. Response response) throws IOException, Servlet. Exception { response. set. Content. Type("text/html"); Print. Writer out = response. get. Writer(); out. println("<html"); out. println( "<head><title>Hello!</title></head>"); out. println("<body><h 1>Hello!</h 1></body>"); out. println("</html>"); } }
JSP n n <%@ directive {attr="value"}* %> <%! declaration %> <% scriptlet %> <%= expression %> n <jsp: declaration> declaration </jsp: declaration> <jsp: scriptlet> scriptlet </jsp: scriptlet> <jsp: expression> expression </jsp: expression> n <%-- jsp comment --%> n n
- Slides: 17