com.antelmann.servlet
Class DBEntryServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.antelmann.servlet.DBEntryServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class DBEntryServlet
- extends javax.servlet.http.HttpServlet
a special servlet capable of displaying entries from a database
- Since:
- 08.04.2009, 13:26:41
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
| 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 |
ecm
protected EntryClassMapper ecm
- per default initialized to
EntryClassMapper.STRING_MAPPER
DBEntryServlet
public DBEntryServlet()
init
public void init()
throws javax.servlet.ServletException
- Overrides:
init in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
createDatabase
protected Database<?> createDatabase()
throws Exception
- Throws:
Exception
createConnection
protected Connection createConnection()
throws SQLException,
GeneralSecurityException
- Throws:
SQLException
GeneralSecurityException
getDatabase
public Database<?> getDatabase()
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
makeReference
protected DBReference makeReference(javax.servlet.http.HttpServletRequest req)
throws Exception
- Throws:
Exception
showEntry
protected void showEntry(DBEntry entry,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- supports
HtmlSupported, Imageable, DetailedString and Object.toString().
For Imageable entries, the parameter values width and height are supported.
- Throws:
javax.servlet.ServletException
IOException
wrongInput
protected void wrongInput(javax.servlet.http.HttpServletResponse resp,
String msg)
throws IOException
- Throws:
IOException
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads