There are two types of JSP annotations: 1. Explicit comments: syntax:<!--comment content--> the annotation client is allowed to see, and the other comment is the corresponding
2. Implicit annotations: (1) Comments inherited from Java style, (2) syntax: <%--comment Content--%> (this is a JSP comment), the client is not allowed to see
1 <!--This annotation client will be able to see -2 <%3 //single-line comment in Java, client cannot see4 /*5 multiple lines of comments in Java that the client cannot see6 */7 %>8 9 <%--can't see--%>
JSP must have web support when executing, need to start tomact
Results such as:
Page directive: syntax <% @page attribute%>, it is used to set the properties of the page and related functions, you can use it to import related classes, output format and so on.
Import Package: <% @page import= "package name. Class Name"%>
Set MIME: Normally contenttype= "text/html", output in HTML format, if you want to output in Word file, then set contenttype to "Application/word" to view the relevant mappings, You can consult the Tomcat/conf/web.xml file for more information.
Set file encoding: In JSP pure in pageencoding use pageencoding, not exist when use CharSet, and finally use ISO08859-1 encoding
Javaweb Study Notes 1-jsp notes and page directives