public abstract class WebClientServletAbstract
extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
protected Document |
xmlDocument |
Constructor and Description |
---|
WebClientServletAbstract() |
Modifier and Type | Method and Description |
---|---|
abstract void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method answers all client requests.
|
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method redirects all requests to the doGet-method.
|
void |
getXMLDocViaRMI(String host,
String port,
String service)
This method connects to rmi-registry on specified, host, port and service
and tries to receive a xml-document which is saved to global
variable xmlDocument if the attempt was succesful otherwise
an exception is thrown.
|
abstract void |
printXMLDoc(Document xmlDocument,
StreamSource stylesource,
javax.servlet.http.HttpServletResponse response)
This method will be responsible for the transformation of the xmlDocument
with the StreamSource (generated from xslt-stylesheet) in a html-page and
output on HttpServletResponse.
|
StreamSource |
readXMLConfig(Element configroot,
String service)
This method receives the root-element of a config-file and a servicename.
|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
protected Document xmlDocument
public abstract void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
request
- the request from the client-sideresponse
- the response from the servlet to the clientjavax.servlet.ServletException
IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
request
- the request from the client-sideresponse
- the response from the servlet to the clientjavax.servlet.ServletException
IOException
public void getXMLDocViaRMI(String host, String port, String service) throws MalformedURLException, RemoteException, NotBoundException
host
- hostname of computer where the rmi-registry is runningport
- portnumber of rmi-registry on hostservice
- servicename of rmi-serviceMalformedURLException
RemoteException
NotBoundException
public abstract void printXMLDoc(Document xmlDocument, StreamSource stylesource, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
xmlDocument
- stylesource
- response
- javax.servlet.ServletException
public StreamSource readXMLConfig(Element configroot, String service) throws javax.servlet.ServletException
configroot
- the root-element of the config-fileservice
- the servicename for which the stylesheet should be transformed in a StreamSourcejavax.servlet.ServletException
Copyright © 2013. All Rights Reserved.