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.


Constructor Index

 o PostMessage()

Method Index

 o doGet(HttpServletRequest, HttpServletResponse)
Print the form to get content of the message to be posted
 o doPost(HttpServletRequest, HttpServletResponse)
Store the message in the DB and make additions into the NEWMESSAGES table as well
 o init(ServletConfig)
Initialise the servlet

Constructors

 o PostMessage
 public PostMessage()

Methods

 o init
 public void init(ServletConfig config) throws ServletException
Initialise the servlet

Parameters:
config - ServletConfig
Overrides:
init in class GenericServlet
 o 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
 o 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