JSP入门初级教程之JSP指令

http://tech.ddvip.com   2006年08月21日    社区交流

本文详细介绍JSP入门初级教程之JSP指令

  <JSP directive mso-hansi-font-family:"">影响servlet 类的整体结构。它常用以下形式:

  <%@ directive attribute=”value”%>  

  而且,您可以将多个属性写在一个语句中:

    <%@ directive attribute1="value1" attribute2="value2" attributeN="valueN" %>

  有两种主要的directive:

  page,允许您做一些类似import classes的事,定义servlet的超类(Superclass),

  mso-hansi-font-family:"">等;

  include,允许您将文件插入servlet类中(当JSP文件翻译为servlet时)。

  一、JSP page Directive

  语法:

  <%@ page
[ language="java" ]
[ extends="package .class" ]
[ import="{package .class | .*}, ..." ]
[ session="true|false" ]
[ buffer="none|8kb|sizekb" ]
[ autoFlush="true|false" ]
[ isThreadSafe="true|false" ]
[ info="text" ]
[ errorPage="relativeURL" ]
[ contentType="mimeType [ ;charset=characterSet ]" |
"text/html ; charset=ISO-8859-1" ]
[ isErrorPage="true|false" ]
%>

  Page directive mso-hansi-font-family:"">允许您定义一些区分大小写的属性:

  (1)import = “package.class”或 import = “package.class1,..,package.classN”。

  mso-hansi-font-family:"">

来源:天极网    作者:清枫    责编:豆豆技术应用

正在加载评论...