This project is using several video IDs to find the channels and the video infomation of these channels.
- install
tomcat
andjdk-1.8
- add jar files in
youtube_search_video/jersey_jar.zip
intoWebservice1
,Webservice2
andyoutubeClient
lib. - add jar files in
youtube_search_video/database_jar.zip
intodatabase1
,database2
,Webservice1
andWebservice2
lib.
- using mysql command to create a database.
- change the file
youtube_search_video/jdbc.properties
. Changeurl
,name
andpassword
according to yourself. - if code cannot find path of
jdbc.properties
andchannelList.txt
, change the files path in the code.- database1
- change
jdbc.properties
path in command line23
to the path in your computer. - change
channelList.txt
path in command line160
to the path in your computer.
- change
- database2
- change
jdbc.properties
path in command line17
to the path in your computer. - change
channelList.txt
path in command line139
to the path in your computer.
- change
- database1
- run
CreateDB.java
indatabase1
anddatabase2
to create tablechannellist
andvideolist
.
- if code cannot find path of
jdbc.properties
, change the pathjdbc.properties
in the code.- in the command line
9
ofwebservice1
- in the command line
10
ofwebservice2
- in the command line
- using java to run the
WebServiceStartUp.java
in pathWebService1\src\main\java\team\ateam\jaxrs\wevservice1
andWebService2\src\main\java\team\ateam\jaxrs\wevservice2
. Then this two webserivce run in port9998
and9999
- Using IDE
- run the code using tomcat.
- input
127.0.0.1:8080/youtubeClinet/home.jsp
in web address bar start using client.
- Using war package
- put war package
youtubeClient.war
which in folderyoutube_search_video/
under tomcat. - run the tomcat.
- input
127.0.0.1:8080/youtubeClinet/home.jsp
in web address bar start using client.
- put war package
- in
127.0.0.1:8080/youtubeClinet/home.jsp
, the video id list you can input as follow:you can input like thisgNd5Zdc1voI GaLlQau3sDU lZo4udUGhuo S73u2WpW5uQ sEhy-RXkNo0 1WifEFI6eK8 T4_ImSneNIE wP8Fg-372gM LmmfR_Qd3KI kyfb8lGAveY m-QVxS8TvDo a6AHVbfyQVs
gNd5Zdc1voI@T4_ImSneNIE@kyfb8lGAveY
to input multiple video id. (PS: The home page only support correct input to redirect next page. (The input content must be in the list and with right format.) The channelChoose page only redirect to next page correctly when you choose some channels. It can not redirect correctly when you choose nothing.) - then,
127.0.0.1:8080/youtubeClinet/channelChoose.jsp
will show the channel according to video ids which you gave. You can choose several channels and submit. 127.0.0.1:8080/youtubeClinet/videoList.jsp
page will show the video cover image and title according to channel ids which you gave.- final, click
details
button to go to127.0.0.1:8080/youtubeClinet/videoDetail.jsp
page. This page will show cover image, title, descript, pushlish time, view counts, like counts, dislike counts and commend counts to you.