Link to servlet and execute doGet ()?

http://localhost:8080/guestbook/servlet/getMessages can query the database

/ servlet/getMessages is the URL of GetMessagesServlet. Query database function defined in doGet () in GetMessagesServlet. Why do you execute doGet () when you connect to this Servlet?

Mar.07,2021

because you are initiating a request through the access form of url, which initiates a request of type get.


in fact, this servlet specification defines the interface of this piece in the specification at the beginning, and then it is implemented by a specific WEB container (such as: TOMCAT) implementation, that is, the specific implementation of the servlet container code contains the implementation of calling the corresponding method after receiving the request. For example, if this is a get request, you will call doGet


servlet life cycle to learn about the execution sequence. Enter a URL request in the browser address bar, which is a get request.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3f79c-44828.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3f79c-44828.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?