JSP Learning Notes 3

Compiler Commands

  1. Page
    -For defining the global properties of JSP file, generally, page compiler commands existing on the top of file.
    -language: set the script language type, default is java language.
    -contentType: mam type & code type for web
    -pageEncoding: for JSP code type

  2. import
    -import = "[package.class]" *NO “;”.
    -Use several page commands separately.
    -Also can use , separate the different packages.

  3. include
    -including a web file(html file, JSP file, or txt file) into a JSP file.
    -use <%@ include file="[htmlFileName].html"%> to include a html file.
    -<br/> is a new line character.
    -In both including file and being included file, same variable cannot be defined twice, <%!and %>for declaring variable. Because after including web file, it will be genereated as a one servlet file.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章