|
||||||||||
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
org.alltimeflashdreamer.mailwebform.AbstractMailWebFormServlet
Title: AbstractMailWebFormServlet
Description: The abstract superclass for MailWebForm's servlets collects
fields and methods used by each of the extending classes.
Field Summary | |
(package private) GlobalProperties |
globalProperties
Properties instance storing the values read from the global properties file |
(package private) MailFormProviderList |
mailFormProviders
the list of known providers of a mailwebform hosted by this servlet, including the "system" provider |
Constructor Summary | |
(package private) |
AbstractMailWebFormServlet()
|
Method Summary | |
void |
destroy()
Cleans up pointers and closes resources. |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Since this servlet makes no distinction between a GET and a POST, pass the GET requests over to the doPost method. |
abstract void |
doPost(HttpServletRequest request,
HttpServletResponse response)
This method is declared only, to make sure that extending classes override, i.e. implement it. |
(package private) static String |
getConfigDirProperty()
Reads the system property defining the app's config directory. |
(package private) File |
getCredentialsFile()
Returns the abstract File instance pointing to the user credentials file. |
(package private) String |
getParameterIgnoreCase(HttpServletRequest request,
String sKey)
Searches the list of parameter names case-insensitively for the given key and returns the first value, if found. |
(package private) String[] |
getParameterValuesIgnoreCase(HttpServletRequest request,
String sKey)
Searches the list of parameter names case-insensitively for the given key and returns the value list, if found. |
(package private) File |
getPropertyFile()
Returns the abstract File instance pointing to the global properties file. |
(package private) void |
printOutput(String sText,
HttpServletResponse response)
Prints the given text to the response's output writer, flushes and finally closes it. |
(package private) void |
readGlobalProperties()
Reads the settings from the global properties file which must reside in the application classes' root folder. |
(package private) void |
showErrorScreen(MailWebFormException mwfe,
HttpServletRequest request,
HttpServletResponse response)
Wraps the given error message into the JSPBean and redirects the client to the error page. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
GlobalProperties globalProperties
MailFormProviderList mailFormProviders
Constructor Detail |
AbstractMailWebFormServlet()
Method Detail |
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
request
- (see description of implementing doPost method)response
- (see description of implementing doPost method)
ServletException
- (see description of implementing doPost method)
IOException
- (see description of implementing doPost method)public abstract void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
request
- (see description of implementing doPost method)response
- (see description of implementing doPost method)
ServletException
- (see description of implementing doPost method)
IOException
- (see description of implementing doPost method)void readGlobalProperties() throws MailWebFormException
MailWebFormException
- wrapped and commented IOException, if one was
thrownFile getPropertyFile() throws MailWebFormException
MailWebFormException
- if the file is missing or not editableFile getCredentialsFile() throws MailWebFormException
MailWebFormException
- if the system's configdir property isn't
setstatic String getConfigDirProperty() throws MailWebFormException
MailWebFormException
- if the property isn't definedString getParameterIgnoreCase(HttpServletRequest request, String sKey)
request
- what to query for the URL parameterssKey
- the key that shall case-insensitively be searched for
String[] getParameterValuesIgnoreCase(HttpServletRequest request, String sKey)
request
- what to query for the URL parameterssKey
- the key that shall case-insensitively be searched for
void printOutput(String sText, HttpServletResponse response) throws IOException
sText
- a text that is wrapped into a very simple HTML pageresponse
- contains the client's url to write to
IOException
- thrown by the PrintWriter class, if anyvoid showErrorScreen(MailWebFormException mwfe, HttpServletRequest request, HttpServletResponse response) throws IOException
mwfe
- the application-specific error object that is to be renderedrequest
- the client's request objectresponse
- used for redirecting the client
IOException
- thrown by the PrintWriter class, if anypublic void destroy()
destroy
in interface Servlet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |