Skip to content

Commit b77cbe3

Browse files
Merge pull request #21 from lanlab-org/Jifry-201831990734吴钟富-manythings
Many improvements
2 parents 3f0cce4 + ca1aba1 commit b77cbe3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2028
-1353
lines changed

The things I have done.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ The things I have done (What I still remember):
44
2、The administrator can edit and add subject;
55
3、The problem of Chinese garbled code is solved;
66
4、The type and size of uploaded files are limited;
7-
5、Fixed some bugs in the original project;
7+
5、Statistics of article visits;
8+
6、The time format, background color,and spaces are compatible in the search box,
9+
7、Add the author's name when publishing the article,
10+
8、Change the title of the page header to the specific article name when clicking the specific article page,
11+
9、If the comment is too long, only the previous part will be displayed.
12+
10、Add function of showing two articles with the most likes according to the ideas provided by other groups.
13+
11、Add Verification Code according to the ideas provided by other groups.
14+
12、Change Title uniqueness to Article ID uniqueness.
15+

db.sql

Lines changed: 282 additions & 18 deletions
Large diffs are not rendered by default.

pom.xml

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5-
<modelVersion>4.0.0</modelVersion>
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>zjnu</groupId>
8-
<artifactId>WZF_OAPS</artifactId>
9-
<version>1.0-SNAPSHOT</version>
10-
<packaging>war</packaging>
7+
<groupId>zjnu</groupId>
8+
<artifactId>WZF_OAPS</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<packaging>war</packaging>
1111

12-
<name>WZF_OAPS Maven Webapp</name>
13-
<!-- FIXME change it to the project's website -->
14-
<url>http://www.example.com</url>
12+
<name>WZF_OAPS Maven Webapp</name>
13+
<!-- FIXME change it to the project's website -->
14+
<url>http://www.example.com</url>
1515

16-
<properties>
17-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18-
<maven.compiler.source>1.7</maven.compiler.source>
19-
<maven.compiler.target>1.7</maven.compiler.target>
20-
</properties>
16+
<properties>
17+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
<maven.compiler.source>1.7</maven.compiler.source>
19+
<maven.compiler.target>1.7</maven.compiler.target>
20+
</properties>
2121

22-
<dependencies>
23-
<dependency>
24-
<groupId>commons-fileupload</groupId>
25-
<artifactId>commons-fileupload</artifactId>
26-
<version>1.3</version>
27-
</dependency>
28-
<dependency>
29-
<groupId>org.springframework</groupId>
30-
<artifactId>spring-context</artifactId>
31-
<version>5.0.5.RELEASE</version>
32-
</dependency>
33-
<dependency>
34-
<groupId>org.springframework</groupId>
35-
<artifactId>spring-web</artifactId>
36-
<version>5.0.5.RELEASE</version>
37-
</dependency>
38-
<dependency>
39-
<groupId>jstl</groupId>
40-
<artifactId>jstl</artifactId>
41-
<version>1.2</version>
42-
</dependency>
43-
<dependency>
44-
<groupId>mysql</groupId>
45-
<artifactId>mysql-connector-java</artifactId>
46-
<version>5.1.32</version>
47-
</dependency>
48-
<dependency>
49-
<groupId>commons-io</groupId>
50-
<artifactId>commons-io</artifactId>
51-
<version>2.4</version>
52-
</dependency>
22+
<dependencies>
23+
<dependency>
24+
<groupId>commons-fileupload</groupId>
25+
<artifactId>commons-fileupload</artifactId>
26+
<version>1.3</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.springframework</groupId>
30+
<artifactId>spring-context</artifactId>
31+
<version>5.0.5.RELEASE</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.springframework</groupId>
35+
<artifactId>spring-web</artifactId>
36+
<version>5.0.5.RELEASE</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>jstl</groupId>
40+
<artifactId>jstl</artifactId>
41+
<version>1.2</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>mysql</groupId>
45+
<artifactId>mysql-connector-java</artifactId>
46+
<version>5.1.32</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>commons-io</groupId>
50+
<artifactId>commons-io</artifactId>
51+
<version>2.4</version>
52+
</dependency>
5353

54-
<dependency>
55-
<groupId>junit</groupId>
56-
<artifactId>junit</artifactId>
57-
<version>4.11</version>
58-
<scope>test</scope>
59-
</dependency>
60-
<dependency>
61-
<groupId>javax.servlet</groupId>
62-
<artifactId>javax.servlet-api</artifactId>
63-
<version>3.1.0</version>
64-
</dependency>
65-
</dependencies>
54+
<dependency>
55+
<groupId>junit</groupId>
56+
<artifactId>junit</artifactId>
57+
<version>4.11</version>
58+
<scope>test</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>javax.servlet</groupId>
62+
<artifactId>javax.servlet-api</artifactId>
63+
<version>3.1.0</version>
64+
</dependency>
65+
</dependencies>
6666

67-
<build>
68-
<finalName>WZF_OAPS</finalName>
69-
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
70-
<plugins>
71-
<plugin>
72-
<artifactId>maven-clean-plugin</artifactId>
73-
<version>3.1.0</version>
74-
</plugin>
75-
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
76-
<plugin>
77-
<artifactId>maven-resources-plugin</artifactId>
78-
<version>3.0.2</version>
79-
</plugin>
80-
<plugin>
81-
<artifactId>maven-compiler-plugin</artifactId>
82-
<version>3.8.0</version>
83-
</plugin>
84-
<plugin>
85-
<artifactId>maven-surefire-plugin</artifactId>
86-
<version>2.22.1</version>
87-
</plugin>
88-
<plugin>
89-
<artifactId>maven-war-plugin</artifactId>
90-
<version>3.2.2</version>
91-
</plugin>
92-
<plugin>
93-
<artifactId>maven-install-plugin</artifactId>
94-
<version>2.5.2</version>
95-
</plugin>
96-
<plugin>
97-
<artifactId>maven-deploy-plugin</artifactId>
98-
<version>2.8.2</version>
99-
</plugin>
100-
</plugins>
101-
</pluginManagement>
102-
</build>
67+
<build>
68+
<finalName>WZF_OAPS</finalName>
69+
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
70+
<plugins>
71+
<plugin>
72+
<artifactId>maven-clean-plugin</artifactId>
73+
<version>3.1.0</version>
74+
</plugin>
75+
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
76+
<plugin>
77+
<artifactId>maven-resources-plugin</artifactId>
78+
<version>3.0.2</version>
79+
</plugin>
80+
<plugin>
81+
<artifactId>maven-compiler-plugin</artifactId>
82+
<version>3.8.0</version>
83+
</plugin>
84+
<plugin>
85+
<artifactId>maven-surefire-plugin</artifactId>
86+
<version>2.22.1</version>
87+
</plugin>
88+
<plugin>
89+
<artifactId>maven-war-plugin</artifactId>
90+
<version>3.2.2</version>
91+
</plugin>
92+
<plugin>
93+
<artifactId>maven-install-plugin</artifactId>
94+
<version>2.5.2</version>
95+
</plugin>
96+
<plugin>
97+
<artifactId>maven-deploy-plugin</artifactId>
98+
<version>2.8.2</version>
99+
</plugin>
100+
</plugins>
101+
</pluginManagement>
102+
</build>
103103
</project>

src/main/java/com/javaBeans/AdministorController.java renamed to src/main/java/com/controller/AdministorController.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
package com.javaBeans;
1+
package com.controller;
22

33

4-
import com.database.DB;
4+
import com.service.DB;
55
import com.javaBean.Administrator;
66
import com.javaBean.Subject;
7+
78
import javax.servlet.ServletException;
89
import javax.servlet.annotation.WebServlet;
910
import javax.servlet.http.HttpServlet;
@@ -132,13 +133,16 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
132133
}
133134

134135
if (checkstatus) {
136+
//JOptionPane.showMessageDialog(null, "com.javaBean.Article Title is already exist please try anotherone ", "Info", JOptionPane.INFORMATION_MESSAGE);
137+
135138
request.setAttribute("subject", oldsubject);
136139

137140
request.getRequestDispatcher("AdministratorEdit.jsp").forward(request, response);
138141
} else {
139142

140143

141144
if (newsubject.length() > 30) {
145+
//JOptionPane.showMessageDialog(null, "you have typed more than 100 letters in Highlights", "Info", JOptionPane.INFORMATION_MESSAGE);
142146
request.getSession().setAttribute("info", "subject name长度不能超过30个字符");
143147
request.setAttribute("subject", oldsubject);
144148
request.getRequestDispatcher("AuthorEdit.jsp").forward(request, response);
@@ -157,6 +161,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
157161

158162
request.getRequestDispatcher("AdministratorHome.jsp").forward(request, response);
159163
}
164+
// } else
160165

161166
}
162167

0 commit comments

Comments
 (0)