public final class XMLResponseHeader extends Object implements org.pageseeder.xmlwriter.XMLWritable
This class is used to produce consistent headers for all the servlets.
The area name and service name, must be specified by the servlet.
The HTTP parameters are the parameters attached with the HTTP request. They are returned in the order in which they are given by the HTTP request. Values for parameters with multiple values are returned in order as separate parameters with the same name.
The servlet path info is the result of
HttpServletRequest.getPathInfo()
.
The servlet context path is the result of
HttpServletRequest.getContextPath()
.
The remote host is the result of
javax.servlet.http.ServletRequest#getRemoteHost()
.
The remote port is the result of
javax.servlet.http.ServletRequest#getRemotePort()
.
Modifier | Constructor and Description |
---|---|
protected |
XMLResponseHeader(org.pageseeder.berlioz.servlet.CoreHttpRequest core,
Service service,
URIResolveResult results)
Creates a new XML response header.
|
Modifier and Type | Method and Description |
---|---|
void |
toXML(org.pageseeder.xmlwriter.XMLWriter xml)
Writes the XML response for this header.
|
protected XMLResponseHeader(org.pageseeder.berlioz.servlet.CoreHttpRequest core, Service service, URIResolveResult results)
core
- The core HTTP info.service
- The service object.results
- The result of URI resolution.public void toXML(org.pageseeder.xmlwriter.XMLWriter xml) throws IOException
<header>
<!-- Deprecated in Berlioz 1.0 -->
<group>[service group name]</group>
<service>[service name]</service>
<path-info>[berlioz path]</path-info>
<context-path>[servlet context path]</context-path>
<!-- Deprecated in Berlioz 1.0 -->
<host>[server host]</host>
<port>[server port]</port>
<url>[url (up to query)]</url>
<query-string>[query string]</query-string>
<!-- End deprecated in Berlioz 1.0 -->
<location scheme="[http|https]"
host="[hostname]"
port="[post]"
path="[path]"
base="[base]"
query="[query]">[full url]</location>
<path context="[servlet context path]"
prefix="[prefix if berlioz mapped to a prefix]"
info="[berlioz path]"
extension="[prefix if berlioz mapped to an extension]"/>
<http-parameters>
<parameter name="[name-A]">[value-A]</parameter>
<parameter name="[name-B]">[value-B1]</parameter>
<parameter name="[name-B]">[value-B2]</parameter>
<parameter name="[name-C]">[value-C]</parameter>
<parameter name="[name-D]">[value-D]</parameter>
<!-- ... -->
</http-parameters>
<uri-parameters>
<parameter name="[name-X]">[value-X]</parameter>
<parameter name="[name-Y]">[value-Y]</parameter>
<!-- ... -->
</uri-parameters>
<berlioz version="[version]" mode="[mode]"/>
</header>
toXML
in interface org.pageseeder.xmlwriter.XMLWritable
xml
- The XML Writer to use.IOException
- If thrown by the underlying XML Writer.XMLWritable.toXML(org.pageseeder.xmlwriter.XMLWriter)
Copyright © 2016 Allette Systems. All rights reserved.