JSP review Essence

Source: Internet
Author: User

Question about JSP Chinese parameter passing: request. setcharecterencoding ("GBK") on the acceptance page; only valid for post submission
If you want to thoroughly handle the problem, you can take the following measures on the acceptance page:
String A = request. getparameter ("A"). getbytes ("iso8859-1", GBK );
Server jump
<JSP: Forward page = ""/>
"/" Indicates the root of the website.

Client jump
<A href =/>
<Meta http-equiv = "refresh" content = "3; url = 2.jsp">
Response. sendredirect ();
Javascript; history. Back ()
Modify Protocol
Response. setheader ("refresh", "3; url = "");
When the client jumps, "/" indicates the root of the server.

A session can be accessed as long as the browser is not closed, and the sessionid is the same (the server assigns the session ID ).

Request can be used with request

<Include file = "??. JSP "/>
What is included at this time ??. Variables in JSP will be accessed first
When a static file contains a. txt file, the variables defined in the. txt file can be directly copied. The static file can contain files in any format.

<JSP: Include flush = "true" page = "Inc. jsp"/> separate execution with only results
<JSP: Param name = "" value = ""/> this parameter must be obtained using the request object after being passed.

JSP comment Ctrl + Shift +/

<JSP: usebean id = "user" class = ""/>
<JSP: setproperty property = "*" name = "user"/>

Eclipse reconstruction Extraction Method

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.