Common problems and solutions in Web projects __web

Source: Internet
Author: User
Tags tomcat server

Common problems and solutions in Web projects

Http://blog.sina.com.cn/s/blog_51addfe401009e9s.html


1. Page effects such as: pop-up menu, there are special special effects code set. General DOM Operation (HTML,DIV) implementation

2. Minimize the use of hidden and display layers, instead of elements.innerhtml= "tagged text" dynamic overlay.

3. Database modeling: CDM/PDM, preferably directly with PDM, or directly with the client tools in the visual interface to build the table.

In the CDM the table primary key field names cannot be the same, otherwise the system cannot be differentiated after the association is established.

4. Report printing, print the entire page in the Web page is implemented by JavaScript code, if you want to achieve the printing of a DIV requires a special plug-in.

5. The outline design and detailed design can be done using the UML Plug-ins in eclipse: Draw a use case diagram (which can generate GIF files), build a package structure diagram, and then
Package to add interfaces and class diagrams, and to establish relationships between classes. The Java source files can be generated directly after the construction.

6. Garbled question: First, set the encoding type of the editor in Eclipse, and each item must set the encoding type in its properties.
The Tomcat server must also set the default encoding type (set in Server.xml)
MySQL garbled: When you install MySQL should choose the Database engine type (ENGINE=INNODB) and the default encoding format is: UTF8
If you do not set up at installation time, you can select the encoding format when you create the database, and then set the
The database engine type. (It's a good idea to export all the tables, replace them, replace the settings for all the tables) and delete the original
Table, and then import the modified table

7.web Project three layer structure:
Interface and method definitions in the business layer: a function block consisting of a use case or a few use cases can be defined as an interface, where all
System is defined as a method, which in this section involves the IO of the database, in some case the DAO layer defines various
A method dedicated to database object IO for Business layer method invocation. (the method in DAO contains only IO operations and does not contain any business
Logic).


8. Encapsulate client form data in one object: Import an external package (Commons-beanutils.jar) and use
Beanutils.populate (Vo object, Request.getparametermap ()); You can set the data in the form into a Vo object
The value of the property that is the same as the form control name.



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.