|
1 | 1 | # Web-ChatApplication |
2 | | -Application with JSPs and Servlets |
| 2 | +## Application with JSPs and Servlets |
3 | 3 | . |
4 | 4 | . |
5 | 5 | . |
6 | | - It provides client application which runs on the users’ desktop and server application which runs on any machine on the network. To start chatting our client should get connected to a server where they can do group and private chatting. |
| 6 | + **It provides client application which runs on the users’ desktop and server application which runs on any machine on the network. To start chatting our client should get connected to a server where they can do group and private chatting.** |
7 | 7 |
|
8 | 8 |
|
9 | | -#Software requirements of the project |
| 9 | +## Software requirements of the project |
10 | 10 | Windows & Higher version (32/64-bit) license copies as per requirement |
11 | 11 | Tomcat9 Server |
12 | 12 | JDBC connectivity |
13 | 13 |
|
14 | 14 |
|
15 | | -#Implementation Languages used to develop the project |
16 | | -Java |
17 | | -HTML |
18 | | -CSS |
19 | | -JavaScript |
20 | | -Not using AJAX | Socket Programming here, but use Seprate two Frames. |
| 15 | +## Implementation Languages used to develop the project |
| 16 | +- Java |
| 17 | +- HTML |
| 18 | +- CSS |
| 19 | +- JavaScript |
| 20 | +- Not using AJAX | Socket Programming here, but use Seprate two Frames. |
21 | 21 |
|
22 | 22 |
|
23 | | -#Database |
| 23 | +## Database |
24 | 24 | The total number of tables in the database that was identified to build our system is 2. |
25 | | ->CHATAPP_LOGIN |
26 | | ->CHATAPP_CHAT |
27 | | -
|
28 | | - |
29 | | -#Backend |
30 | | -JDBC: JDBC stands for Java Database Connectivity. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database. |
31 | | - |
32 | | -#JSP & Servlets: Java Server Pages (JSP) is a server-side technology that allows development of Web-based applications. |
33 | | - |
34 | | -JSP stands for Java Server Page. It is used to create a web application just like Servlet technology. We can think of JSP as an extension to Servlet because it provides more functionality than servlets such as expression language, JSTL, etc. |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | -#Frontend |
40 | | -HTML (HyperText Markup Language) |
41 | | - |
42 | | -HTML stands for HyperText Markup Language and it is a standard markup language for creating Web pages. It describes the structure of Web pages. |
43 | | - |
44 | | -CSS (Cascading Style Sheets) |
45 | | - |
46 | | -CSS is a language that describes the style of an HTML document. It describes how HTML elements should be displayed. |
47 | | - |
48 | | -Servlets used in the project |
49 | | - |
50 | | - |
51 | | -#Servlets used in the project |
| 25 | +1. CHATAPP_LOGIN |
| 26 | + - This Table have several coulumns and this helps to **Login | Register | List all user ** |
| 27 | + - EMAIL (pk) |
| 28 | + - PASSWORD |
| 29 | + - TIME_STAMP |
| 30 | +2. CHATAPP_CHAT |
| 31 | + - This table have 4 columns and these columns helps to **Store | Retrive(Select)** Chat messages into DataBase |
| 32 | + - MESSAGES |
| 33 | + - TIME_STAMP |
| 34 | + - MSG_FROM (FK) |
| 35 | + - REFERENCES CHATAPP_LOGIN ("EMAIL") ON DELETE CASCADE |
| 36 | + - MSG_TO (FK) |
| 37 | + - REFERENCES CHATAPP_LOGIN ("EMAIL") ON DELETE CASCADE |
| 38 | + |
| 39 | + |
| 40 | +## Backend |
| 41 | +**JDBC**: JDBC stands for Java Database Connectivity. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database. |
| 42 | + |
| 43 | +## JSP & Servlets: |
| 44 | +- Java Server Pages (JSP) is a server-side technology that allows development of Web-based applications. |
| 45 | + |
| 46 | +- JSP stands for Java Server Page. It is used to create a web application just like Servlet technology. We can think of JSP as an extension to Servlet because it provides more functionality than servlets such as expression language, JSTL, etc. |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +## Frontend |
| 52 | +###### HTML (HyperText Markup Language) |
| 53 | + |
| 54 | +- HTML stands for HyperText Markup Language and it is a standard markup language for creating Web pages. It describes the structure of Web pages. |
| 55 | + |
| 56 | +###### CSS (Cascading Style Sheets) |
| 57 | + |
| 58 | +- CSS is a language that describes the style of an HTML document. It describes how HTML elements should be displayed. |
| 59 | + |
| 60 | + |
| 61 | +## web.xml |
| 62 | +* Here i use web.xml configuration file as my Properties file. |
| 63 | + - Because we can't use direct Properties file in our webapplication as per my knowledge But it is possible in Standalone java applications |
| 64 | + - using **java.util.Properties** which helps to read properies file value because it is subclass of hashtabe so it contains keys and values pair |
| 65 | +* web.xml is using for configur **welcomePage.jsp** as my welcome file |
| 66 | +* web.xml is using to configure **LoginServlet.java** mapping with url and enable LOAD-ON-STARTUP because at this time i don't know with Annotations to enable. |
| 67 | +* web.xml contains JDBC related properties into **Servlet-Context** parameter to access into whole webapplication, | give reusability of code | esay to modification |
| 68 | + - Becuse it provide |
| 69 | + - consistency |
| 70 | + - Reusability |
| 71 | + |
| 72 | + |
| 73 | +## Servlets used in the project |
| 74 | +* Servlets used in the project 5 |
| 75 | +1. LoginServlet.java |
| 76 | + - This servlet is use to handel Login related request and provide Non-techencal guidence to user to handel next steps. |
| 77 | + - This uses a helper class "com.nt.dao package" where login SQL Queries and Database connection logics exsist. |
| 78 | + - The - LoginServlet - is **Lode-on-startup=0** Servlet which contain init() method with user defined code |
| 79 | + - This code is a logic for giving **Servlet-Context** object to that helper class |
| 80 | + - becuse helper classs is using driver class name, url, pwd, and SQL Queries from **web.xml** configuration file with the help of getInitparameter() method |
| 81 | + - of ServeltContext object |
| 82 | + |
| 83 | +2. RegisterServlet.java |
| 84 | + - This servlet is use to handel register request comming to server and provide Non-techencal guidence to user to guide for next steps.. |
| 85 | + - It also uses that same helper class which contains logic to register user into Database |
| 86 | + - That helper class also take query and JDBC properties form web.xml using ServletContext obj which is provided by **LoginServlet.java** on Load-on-startup init() method. |
| 87 | + |
| 88 | +3. ListAllRegisteredUserServlet.java |
| 89 | + - This servlet get request and sends all user who are registered (except that user who requested for List of registered user) in webApplication as response |
| 90 | + - It not take any help of helper class but it self contains logic to connect DataBase and perform SQL operations |
| 91 | + - It take JDBC properties and SQL query for select all users from database with the help of **ServletContext** object and **web.xml** configuration file |
| 92 | + |
| 93 | +4. ShowSavedChatServlet.java |
| 94 | + - This servlet get request and sends all private Chat messages as a responce of perticular user. |
| 95 | + - It not take any help of helper class but it self contains logic to connect DataBase and perform SQL operations |
| 96 | + - It take JDBC properties and SQL query for select all users from database with the help of **ServletContext** object and **web.xml** configuration file |
| 97 | + |
| 98 | +5. StoreChatServlet.java |
| 99 | + - This servlet helps to store private chat into database. |
| 100 | + - It not take any help of helper class but it self contains logic to connect DataBase and perform SQL operations |
| 101 | + - It take JDBC properties and SQL query for select all users from database with the help of **ServletContext** object and **web.xml** configuration file |
| 102 | + |
0 commit comments