Class PostMessage
java.lang.Object
|
+----javax.servlet.GenericServlet
|
+----javax.servlet.http.HttpServlet
|
+----PostMessage
- public class PostMessage
- extends HttpServlet
This servlet implements the posting part of the MessageBoards for the PC
In the doGet method it prints the form to get the Message to be posted and
then submits the form to this very servlet only
In the doPost method it stores the message in the DB.
-
PostMessage()
-
-
doGet(HttpServletRequest, HttpServletResponse)
-
Print the form to get content of the message to be posted
-
doPost(HttpServletRequest, HttpServletResponse)
-
Store the message in the DB and make additions into the NEWMESSAGES table as well
-
init(ServletConfig)
-
Initialise the servlet
PostMessage
public PostMessage()
init
public void init(ServletConfig config) throws ServletException
- Initialise the servlet
- Parameters:
- config - ServletConfig
- Overrides:
- init in class GenericServlet
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException
- Print the form to get content of the message to be posted
- Parameters:
- req - HttpServletRequest
- res - HttpServletResponse
- Overrides:
- doGet in class HttpServlet
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException
- Store the message in the DB and make additions into the NEWMESSAGES table as well
- Parameters:
- req - HttpServletRequest
- res - HttpServletResponse
- Overrides:
- doPost in class HttpServlet