JSP instructions, comments

JSP directives

effect

  • JSP page is used to configure, import the resource file

format

  • <%@ 指令名称 属性名1=属性值1 ...%>
    

classification

  • page: Configuration jsp page

    • contentType equivalent to the response.setContentType ()
      • Provided mime type and character set in response to body
      • Set the encoding of the current jsp page (only advanced development tools can take effect, and the rest need pageEncodeing property)
    • language: Language
    • buffer: buffer
    • import: guide packet (a packet row recommended)
    • errorPage: current exception automatically jump to a specific page page occurs
    • idErrorPage: identifies the current page is an abnormal jump page
      • It is true that you can use exception
  • include: Import Resource page file that contains page

    • <%@ include file="要包含的文件名"%>
      
  • taglib: Import Resources

    • <%@ taglib prefix="前缀" uri=""%>
      

Note

  • HTML comments
    • <- -!>: Only comments html code
  • jsp Notes (recommended)
    • <% - -%>: You can annotate all
Published 51 original articles · won praise 36 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_25884515/article/details/103933474
jsp