Publishing Engine Programmer's Guide > The Arbortext Publishing Engine Sub-Process > Writing Arbortext PE Applications in Java > The E3ApplicationResponse Class
  
The E3ApplicationResponse Class
This class defines an object that collects the elements of the HTTP response that Arbortext Publishing Engine sends to the client making the request. The Arbortext PE sub-process creates an E3ApplicationResponse object and passes it as a parameter to the doGet or doPost method. When doGet or doPost returns, the Arbortext PE sub-process passes the information in the E3ApplicationResponse object to the Arbortext PE Request Manager to return to the client.
The doGet and doPost methods can use the E3ApplicationResponse object to control every element of an HTTP response, including the HTTP result code, any HTTP headers, and, optionally, a file to be returned to the HTTP client.
The E3ApplicationResponse object contains the following:
the state code
the HTTP status code
a collection of HTTP headers
a string containing either an error message, an HTML page, or a redirect target
a file, if one was requested
the archive flag, which determines whether the transaction will be archived
The alternate archive flag, which determines whether the transaction will be archived in an alternate location
The state code directs the Arbortext PE Request Manager to use this data in constructing a response to the client in one of the following ways:
return a fabricated HTML page based on the status code
return a fabricated HTML page based on the status code and string error message
return the status code, HTTP headers, and string HTML page
return the status code, HTTP headers, and file
return the status code, HTTP headers, and file, deleting the file after transmission to the client
redirect the client to another URL
The archive flag determines whether the transaction will be archived. If the flag is set to true, the transaction will be archived, provided the transaction archive is enabled. If the flag is set to false, the transaction won’t be archived unless one of the following overrides it:
The com.arbortext.e3.transactionArchive.selector parameter is set to all
The com.arbortext.e3.transactionArchive.selector parameter is set to error or log and the transaction has failed to publish.
If the transaction will be archived, the alternate archive flag determines whether the transaction will be stored in the alternate transaction archive location. If the alternate archive flag is not set, the transaction is archived to the standard transaction archive. 
The standard transaction archive is accessible from the Transaction Archive link on the Arbortext Publishing Engine index page. The alternate transaction archive is not available from this web page, which allows transactions with sensitive data to be stored in another location which is only accessible to a user with permission to log on to the server or read the network share location.