Starting from scratch -- small problem encountered by e-commerce platform 01 _, e-commerce platform 01

Source: Internet
Author: User

Starting from scratch -- small problem encountered by e-commerce platform 01 _, e-commerce platform 01

How does one set auto-increment on the visual interface of MySql?

When the data type is Int, the auto-increment option is automatically displayed.

 

 

What is $ {pageContext. request. contextPath?

Reference: http://jzgl-javaeye.iteye.com/blog/658446

Using this jsp in a similar way to obtain an absolute path can avoid path failure caused by path repair in tomcat.

 

 

Frame? Frameset?

Http://www.w3school.com.cn/tags/tag_frame.asp

Http://www.w3school.com.cn/tags/tag_frameset.asp

The frameset element defines a framework set. It is used to organize multiple windows (frames ). Each Framework contains independent documents. In its simplest application, the frameset element only specifies the number of columns or rows in the framework set. The cols or rows attribute must be used.

<Frame> the tag defines a specific window (frame) in the frameset ).

Simple three-frame example:

<Html>

<Frameset cols = "25%, 50%, 25%">

<Frame src = "frame_a.htm"/>

<Frame src = "frame_ B .htm"/>

<Frame src = "frame_c.htm"/>

</Frameset>

</Html>

 

Head. jsp does not contain the body or html element.

The pages that reference it already contain these elements, so you don't have to worry about them. The element exists to let the browser know how to display the content in the tag.

 

Why does Servlet use service instead of doPost and doGet?

The simple explanation is that the connection submitted by both the post and get methods will be processed in the service. Then, the service will handle the connection by the corresponding doPost or doGet methods and rewrite the service method, it will not process doPost or doGet any more.

 

Why should I close the result set, status, and connection in sequence when closing the database?

Close database connection: first, there is a limit on the number of connections. If the connection is not closed and many users are used, the system will soon be down. If the Statement object is not closed, it will occupy server resources until the JAVA garbage collection program recycles it.

Close the result set connection: Generally, if you do not close the connection, more and more resources will be occupied, and the server crashes. It is best to release the connection in time.

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.