Home > Database > Mysql Tutorial > JSP由浅入深(7)―― JSP Directives_MySQL

JSP由浅入深(7)―― JSP Directives_MySQL

WBOY
Release: 2016-06-01 14:08:49
Original
858 people have browsed it

  在前面的教程中,我们已经使用了java.util.Date。可以有人就会问:为什么不只使用import java.util.*呢?其实,在JSPs中也可以使用import语句,但是它的语法跟普通的Java是有些差别的。下面给出一个例子:








System.out.println( "Evaluating date now" );

Date date = new Date();

%>

Hello! The time is now





上面的代码中第一行我们调用了一个“directive”。这个JSP“directive”是以


在"page directive"中可以有多个JSP directives。除了"page directive"以外,其它有用的directives有include 和 taglib。在后面的教程中我们再对taglib进行详细的讨论。这里只讨论include directive。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template