One, JSP:
1,jsp Script Syntax:
<% Java Code%>
2,JSP declaration: Declaring a variable or method in a JSP page
Grammar:
<%! Java Code%>
3,jsp expression: An expression executed in a JSP page
Grammar:
<%= expression%> Note: The expression does not end with a semicolon
, two, servlet and nine large built-in objects:
Out object: Obtained from the Resp.getwriter () method
Common methods are:
1,void println (): Print a string to the client
2,void Clear (): Clear buffer contents, if called after flush throws an exception
3,void Clearbuffer (): Clears the buffer contents if the call does not throw an exception after flush
4,void flush (): Output buffer contents to client
5,int getbuffersize (): Returns the size of the number of buffer bytes, 0 if no buffer is set
6,int getremaining (): Returns the number of buffers remaining available
7,boolean Isautoflush (): Returns when the buffer is full, automatically empties or throws an exception
8,void Close (): Turn off the output stream
The difference between get and post:
There are two ways to submit your form:
1,get: Data is submitted in plaintext through a URL, and the data is visible in the URL. Submitted data
Up to 2KB, less secure, but more efficient than post mode. Suitable for submitting data with little or no high data security
, such as: Search, query and other functions
2,post: Encapsulates user-submitted information within the HTML header. It is suitable for submitting user information with large amount of data and high security.
For example: registration, modification, upload and other functions.
java-web,jsp article