IntelliJ problems encountered in graduation design and the solutions

Source: Internet
Author: User

DAY01:
1.1099 port occupied using netstat-ano|findstr ' 1099 ' discovery Port not occupied resolved: Restart-March 12, 2016 07:39:01
2. After the Tomcat service is manually started, the project does not function properly with the run JSP, for example: Http://localhost:8081/web01/regin.do cannot navigate to WEB01 Project resolution: Do not manually start Tomcat, use IntelliJ Run will start automatically tomcat-2016 March 12 07:48:19
3. If the SQL statement is incorrectly written, IntelliJ will error-March 12, 2016 08:06:45
4.intelliJ will automatically modify the Tomcat output directory to his default directory such as input: http://localhost:8081/web01/web/index.jsp browser Open will display 404, but input:/http localhost:8081 will show web01/web/index.jsp this page
Resolution: This time need to change the artifacts tab of the output directory:f:\ideaprojects\untitled\out\artifacts\web01_war_exploded to F:\ Ideaprojects\untitled March 12, 2016 08:32:34
5. Using the EL expression to get the value of radio, if the checked output is empty, the unchecked output is NULL for example: Male:null female:2016 March 12 10:27:14

---AMday02:
1. The submission of the control submit in its Click event returns false-2016 March 13 08:51:34 2.ajax Send data to the server so write
$.ajax ({
URL: "http ://localhost:8081/checkusername.do ",
Data: {username: $ (" #username "). Val ()},
DataType:" HTML ",
Success: function (Result) {
$ ("#checkname"). HTML (result);
}
}); --March 13, 2016 10:25:46 3.select statement the resultset to a query using ExecuteQuery () will never be null
Therefore, if you need to query the table for data, you can query the count (*) and then use
W Hile (B.next ()) {
count=b.getstring (1);
System.out.println ("b.getstring (1):" + count);
}
Return!count.equals ("0");
Such logic that the query has data----March 13, 2016 11:01:51
--am


DAY03:
1. Add a non-null constraint to the table ALERT table user ADD uniqe (username,id); --March 14, 2016 07:42:24
2: Delete Table content TRUNCATE table (Schema) Table DROP (reuse) STORAGE
The STORAGE substring is optional and the default is drop STORAGE. When you use drop storage, the table and table indexes are shortened, the table shrinks to a minimum, and the next parameter is reset. Reuse storage does not shorten the table or adjust the next parameter.
--March 14, 2016 08:02:46
3. View all the information in the table Show create table user;--March 14, 2016 08:11:28
4. Delete constraint (MySQL) Alert table user Drop index id_2; (constraint names do not need to be enclosed in single quotes)
--March 14, 2016 08:12:35
--am


DAY04:
1.typeof (Result) View data type--March 15, 2016 09:27:53
2. The length of the string data returned from the server is inconsistent with the data itself, and this time it is necessary to use the $.trim (result) function to remove the data from both sides of the space--March 15, 2016 09:36:10
3. The problem: Using AJAX to determine whether the password is correct before submission, if the password is incorrect, after the Password box output: "Password is incorrect" This sentence, only the Submit click function return False can be, but no matter how to do, the page is refreshed, The solution is as follows:
<script>
var flag=0;
$ (document). Ready (function () {
$ ("#submit"). Click (function () {
$.ajax ({
Async:false,
URL: "Login.lo",
Data: {username: $ ("#username"). Val (), Password: $ ("password"). Val ()},
DataType: "HTML",
Success:function (Result) {
if ($.trim (result) = = "NULL") {
$ ("#check"). HTML ("Password is incorrect!") ")
window.flag=1;
alert (Window.flag);
}
}
});
alert (Window.flag);
if (window.flag== 1) {Window.flag =0; return false;}
});
});
</script>
Note the problem:
1st:flag the problem of global variables, use Window.flag in function to assign a value to flag
2RD: Synchronous and asynchronous problems, since Ajax is an asynchronous function, this time alert (Window.flag); This code begins, and $.ajax ({This sentence runs in the background at the same time, the value of flag is confusing, this time need to async:false Ajax synchronization, there is the order of execution.)
---March 15, 2016 10:26:10

DAY05:

Today solves a problem, very bad description, but the solution is to query the password is correct, query the database parameters do not give the password, directly to the user name, and then in the servlet compare the Web page to the password and database to the password.

--March 16, 2016 11:16:42

IntelliJ problems encountered in graduation design and the solutions

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.