java-web,jsp article

Source: Internet
Author: User
Tags html header

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.