Lesson3

165 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
165
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lesson3

  1. 1.  Username,Password, ,
  2. 2. • action servlet
  3. 3.  Servlet NewFile2.jsp
  4. 4. SQL) SQL) SQL Select query Update query Insert query Delete query
  5. 5. JSP Servlets and Database
  6. 6. Dynamic Web Project Servlet " DataServlet.ja
  7. 7. public class controller { DBconnect db = new DBconnect(); Statement stmt; ResultSet rs = null; public int insert(String sql) { try { db.createConnection(); stmt = db.getStatement(); stmt.executeUpdate(sql); } catch (SQLException ex) { Logger.getLogger(controller.class.getName()).log(Level.SEVERE,null, ex); return 0; } db.closeConnection(); return 1; }
  8. 8. UserDAO Mysql
  9. 9. display

×