Jsp + servlet + JavaBean development web project

1、 Operating principle:

Project dependency package: JDBC database package

JSP sends a request to the web--

The web receives the request and matches the servlet corresponding to the request--

The servlet calls the database Dao layer to operate the database--

If there is data transfer, put it in the request or session

Important: the servlet will execute the doservice () method to determine whether to call doget () or dopost ()

2、 Development steps:

1. Create a new web project

2. Create a new entity class user java

3. Write the operation interface userdao java

4. Write the database operation tool class dbutil java

5. Write an interface to implement userdaoimpl java

6. Write a test file to test whether the underlying data operation is successful usertest java

7. Write a JSP display interface. Only take the user display interface as an example jsp

8. Write the servlet file showaction java

9. On the web Registering servlets in XML

Reproduced at: https://www.cnblogs.com/hackxiyu/p/7073850.html

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>