mls.controller
Class HttpServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--mls.controller.HttpServlet
- public class HttpServlet
- extends javax.servlet.http.HttpServlet
MLS servlet - processes Multiple Listing Service operations
(see doGet() for supported operations).
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.http.HttpServlet |
HEADER_IFMODSINCE,
HEADER_LASTMOD,
LSTRING_FILE,
lStrings,
METHOD_DELETE,
METHOD_GET,
METHOD_HEAD,
METHOD_OPTIONS,
METHOD_POST,
METHOD_PUT,
METHOD_TRACE |
Fields inherited from class javax.servlet.GenericServlet |
config |
Method Summary |
void |
destroy()
Release all resources held by the servlet |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Parse out the operation and call the appropriate method. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process POST operations, just a wrapper around doGet |
void |
init()
Create viewers, workflow, and MLS business object |
private boolean |
isWapUser(javax.servlet.http.HttpServletRequest request)
Return true if this request is from a WAP user agent |
Methods inherited from class javax.servlet.http.HttpServlet |
,
doDelete,
doHead,
doOptions,
doPut,
doTrace,
getAllDeclaredMethods,
getLastModified,
maybeSetLastModified,
service,
service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter,
getInitParameterNames,
getServletConfig,
getServletContext,
getServletInfo,
getServletName,
init,
log,
log |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
OPERATION
private static final java.lang.String OPERATION
- Operation parameter name
htmlViewer
private HtmlViewer htmlViewer
- Template processing HTML viewer
wmlViewer
private WmlViewer wmlViewer
- Template processing WML viewer
mlsBO
private MlsBusinessObject mlsBO
- MLS business object to access MLS data and business rules
Should be implemented as EJB eventually, for scalability
workflow
private Workflow workflow
- MLS workflow operations
HttpServlet
public HttpServlet()
init
public void init()
- Create viewers, workflow, and MLS business object
- Overrides:
- init in class javax.servlet.GenericServlet
destroy
public void destroy()
- Release all resources held by the servlet
- Overrides:
- destroy in class javax.servlet.GenericServlet
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Process POST operations, just a wrapper around doGet
- Overrides:
- doPost in class javax.servlet.http.HttpServlet
- Parameters:
request
- the Http request from the user agentresponse
- where the response is to be written- See Also:
doGet(HttpServletRequest, HttpServletResponse)
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Parse out the operation and call the appropriate method.
- Overrides:
- doGet in class javax.servlet.http.HttpServlet
- Parameters:
request
- the Http request from the user agentresponse
- where the response is to be written
isWapUser
private boolean isWapUser(javax.servlet.http.HttpServletRequest request)
- Return true if this request is from a WAP user agent
- Parameters:
request
- the Http request from the user agent- Returns:
- true if this request is from a WAP user agent