coreservlets
Class ConnectionPoolServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--coreservlets.ConnectionPoolServlet
- Direct Known Subclasses:
- ConnectionPoolServlet2
- public class ConnectionPoolServlet
- extends HttpServlet
A servlet that reads information from a database and
presents it in an HTML table. It uses connection
pooling to optimize the database retrieval. A good
test case is ConnectionPool.html, which loads many
copies of this servlet into different frame cells.
Taken from Core Servlets and JavaServer Pages
from Prentice Hall and Sun Microsystems Press,
http://www.coreservlets.com/.
© 2000 Marty Hall; may be freely used or adapted.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ConnectionPoolServlet
public ConnectionPoolServlet()
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
- doGet in class HttpServlet
init
public void init()
- Initialize the connection pool when servlet is
initialized. To avoid a delay on first access, load
the servlet ahead of time yourself or have the
server automatically load it after reboot.
- Overrides:
- init in class GenericServlet
destroy
public void destroy()
- Overrides:
- destroy in class GenericServlet
initialConnections
protected int initialConnections()
- Override this in subclass to change number of initial
connections.
maxConnections
protected int maxConnections()
- Override this in subclass to change maximum number of
connections.
 |
|---|
| CSAJSP @ amazon.com |
|---|