Some of the problems encountered in the development ssh

Reading a book is one thing, the actual programming will be another matter. . The actual reading good hands there will be all kinds of problems. . .

Here's the question to sum up this assignment. .

# Since when given function function name to note. . Do not write in some libraries. . . For example, click (), this error causing me to look for a long time.

# Repeated references ajax theme will debug output in an error page. . It looks like a small bag to be replaced when the error. . It does not affect the operation

# Struts.xml the package can not have duplicate names. . If the reference is a plurality of intermediate library then with separated. .

# Also note that struts.xml resolution is in order from the fallen come, so that action with attention to the location json library (put back)

#spring is used to manage the relationship between action and business logic of the. . . dao hibernate file is the management and persistence relationships. . Therefore, the action was directly

dao it is of course possible!

# Value passed in several ways: by action struts2 in execute. . Method request with the httpservlet. . Method of session. .

Note that in jsp page form submission action is a request.

# Js in case-sensitive. . java program is case-sensitive.

# Jsp page refresh js script to re-execute the procedure. . Oh, not continuous operation. .

# List can not directly initialize. . Initialized with ArrayList

# Myeclipse use tips: 1, the change struts.xml and other configuration files to recompile

2, commonly used debug function. . Set a breakpoint

The List # convert interator, then iteration output iterator. . . Note that two methods .hasnext () .next ();

3, when using hibernate, set the show-sql hibernate in the configuration profile, you can see the sql statement in the console.

#hibernate配置,generator=native / assign / identify

# When an error occurs field id, attention may not be set to the database to increment increment form, mysql database is automatically incremented by the primary key assigned value, then do not have to enter the id value when inserted. . . . .

4, in building a database table should be avoided when the value of key commands, such as count, create, etc.

5, in a session where multiple dao do not have the same name, or other instances.

! ! When testing, do not delete the previous code, but with the comment, so easy to restore.

 ! ! When considering the problem 30 minutes without thinking on pause, relaxed, a change of thinking. . . .

Reproduced in: https: //www.cnblogs.com/ggppwx/archive/2010/04/23/1718745.html

Guess you like

Origin blog.csdn.net/weixin_33829657/article/details/93871287