Overview Of React Js
Last Updated on : 31st Oct 2024 13:09:21 PM
React is an open-source front-end JavaScript library that is used to build interactive (UI) user interfaces for web development , particularly for single-page applications. It was developed by Facebook in 2013 and is often used for building web applications that are fast, scalable, and maintainable.
Features of react :
1. JSX (JavaScript Syntax Extension)
2. Virtual DOM
3. One-way data binding
4. Performance
5. Conditional statements
6. Components
7. Simplicity
kjuhg
fetch data
Statement st;
ResultSet rs;
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:4306/mydata", "root", "sandip@123");
st = con.createStatement();
String query = "select * from student";
rs = st.executeQuery(query);
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet ViewRecord</title>");
out.println("</head>");
out.println("<body>");
out.println("<center>");
out.println("<table cellspacing='0' width ='500px' border='1'>"); out.println("<tr>");
out.println("<td> Name :</td>");
out.println("<td> Address :</td>");
out.println("<td> Update:</td>");
out.println("<td> Delete:</td>");
out.println("</tr>");
while (rs.next()) {
String name = rs.getString("name");
String address = rs.getString("address");
out.println("<tr>");
out.println("<td> " + name + " :</td>");
out.println("<td> " + address + " :</td>");
out.println("<td> <a href='Edit2?name=" + rs.getString("name") + "'>Edit</a> </td>");
out.println("<td> <a href='Delete?name=" + rs.getString("name") + "'>Delete</a> </td>");
out.println("</tr>");
}
out.println("</center>");
out.println("</body>");
out.println("</html>");
Become a first user to comment