From 1f532d2708f6ca1003537931d7731574ab80cd5b Mon Sep 17 00:00:00 2001 From: salty-chen <68955274+salty-chen@users.noreply.github.com> Date: Fri, 4 Dec 2020 19:37:48 +0800 Subject: [PATCH 1/2] Two files named NewFile1.jsp and Recommand.jsp. Added a function, which recommends the user articles he/she may be interested in. --- NewFile1.jsp | 7 +- Recommand.jsp | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 Recommand.jsp diff --git a/NewFile1.jsp b/NewFile1.jsp index fb2dd42..c26c4ee 100644 --- a/NewFile1.jsp +++ b/NewFile1.jsp @@ -108,7 +108,7 @@ footer Contact Admin -
+ @@ -124,7 +124,7 @@ footer - + select * from article where subject="Physical Science"; @@ -186,6 +186,7 @@ select * from article where subject="Mathematics";
+Recommand diff --git a/Recommand.jsp b/Recommand.jsp new file mode 100644 index 0000000..2b207a2 --- /dev/null +++ b/Recommand.jsp @@ -0,0 +1,173 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> + + + + +Articles + + + + + + +
+ +
+ + + + +select * from article order by popularity DESC + + +
+ + + + + + + + + + + + + + + +
TitleAuthorTimePopularity
+
+ +
+2019 copyright©mjh.mohamed +
+ + + \ No newline at end of file From 8f1e614580ebcb5988ab0cd666c1e6bbecc30c43 Mon Sep 17 00:00:00 2001 From: salty-chen <68955274+salty-chen@users.noreply.github.com> Date: Wed, 20 Jan 2021 20:57:37 +0800 Subject: [PATCH 2/2] Sort article by popularity 1 Spelling mistake corrected: replaced Recommand with Recommend. --- Recommend.jsp | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 Recommend.jsp diff --git a/Recommend.jsp b/Recommend.jsp new file mode 100644 index 0000000..2b207a2 --- /dev/null +++ b/Recommend.jsp @@ -0,0 +1,173 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> + + + + +Articles + + + + + + +
+ +
+ + + + +select * from article order by popularity DESC + + +
+ + + + + + + + + + + + + + + +
TitleAuthorTimePopularity
+
+ + + + + \ No newline at end of file