|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
ch5.persistentData.configure.Controller
public class Controller
Uses the hibernate.cfg.xml file to store the properties for connecting to hibernate.
The hibernate file should be in the classpath. In NetBeans, add it to the default package in Source Packages.
| Constructor Summary | |
|---|---|
Controller()
|
|
| Method Summary | |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Use a helper to do the work of the controller. |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Use a helper to do the work of the controller. |
void |
init()
When the servlet is loaded into memory, initialise Hibernate. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Controller()
| Method Detail |
|---|
public void init()
Reads an initialisation parameter from the web.xml file that controls whether the database table should be created. Whenever it is created, the old data is destroyed.
init in class javax.servlet.GenericServlet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doGet in class javax.servlet.http.HttpServletrequest - Request information encapsulated in a Java objectresponse - Response information encapsulated in a Java object
java.io.IOException
javax.servlet.ServletException
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doPost in class javax.servlet.http.HttpServletrequest - response -
java.io.IOException
javax.servlet.ServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||