|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--SuperServlet | +--ViewTopic
This class implements a servlet for viewing a topic in the forum. It uses table 'messages' in database: 'db_03_peta_la' at 'atlas.dsv.su.se'.
It uses the db-, topic and the message-package for accessing and communication with the database.
Constructor Summary | |
ViewTopic()
|
Method Summary | |
void |
addNoOfViews(int topic_id)
Adds no of views used for a topic. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The Get method is run when the Client requests the htmlFile. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The Post method is run when a new message is added to the guestbook. |
void |
init()
The init-method which is run when servlet is run for the first time. |
void |
showTopic(javax.servlet.http.HttpServletRequest req,
java.io.PrintWriter pw,
java.lang.String forum,
int forum_id,
java.lang.String topic,
int topic_id,
java.lang.String mod)
Fetches the content of one topic in the database and puts it on the Web. |
Methods inherited from class SuperServlet |
destroy |
Methods inherited from class javax.servlet.http.HttpServlet |
service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewTopic()
Method Detail |
public void init() throws javax.servlet.ServletException
The init-method which is run when servlet is run for the first time.
init
in class SuperServlet
javax.servlet.ServletException
- The standard ServletExceptionpublic void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
The Get method is run when the Client requests the htmlFile.
request
- The Requestresponse
- The Responsejava.io.IOException
- The standard IOExceptionjavax.servlet.ServletException
- The standard ServletExceptionpublic void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
The Post method is run when a new message is added to the guestbook.
request
- The Requestresponse
- The Responsejava.io.IOException
- The standard IOExceptionjavax.servlet.ServletException
- The standard ServletExceptionpublic void showTopic(javax.servlet.http.HttpServletRequest req, java.io.PrintWriter pw, java.lang.String forum, int forum_id, java.lang.String topic, int topic_id, java.lang.String mod)
Fetches the content of one topic in the database and puts it on the Web.
req
- The Requestpw
- The PrintWriterforum
- The Forumforum_id
- The Forum identitytopic
- The Topictopic_id
- The Topic identitymod
- The Moderatorpublic void addNoOfViews(int topic_id)
topic_id
- The topic id to be updated with number of views
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |