To use URL addressability, it must be deployed and configured.
To use the URL addressability application, deploy the URL addressability WAR file urladdr.war. The URL addressability application is provided in source and compiled form as a sample in the directory VBR_HOME\docs\examples\java\webapp\urladdr. Deploy the WAR file on an application server of your choice.
The URL Addressability application can be configured by using the application web.xml file. Settings are available for state and debugging.
The URL addressability application can be configured to be stateful or stateless. This configuration determines how long the session with the repository remains active. In stateful mode, which is the default, the application first checks to see if a requester is logged into the repository that contains the requested repository item. If not logged into the repository, the requester is prompted for credentials. If the requester successfully logs in, the repository session of the user is saved in the session of the user. The requester will not again be prompted for a user name and password until either the session has expired or a login to another repository is attempted and the previously used credentials fail.
In stateless mode, a new login to a repository is created with each request and then deleted. After a user provides valid credentials, the credentials are stored in the HTTP header. The following available settings are available in the web.xml file of the urladdr.war application:
<init-param> <param-name>stateful</param-name> <param-value>true</param-value> </init-param>=
<init-param> <param-name>stateful</param-name> <param-value>false</param-value> </init-param>
An application that is designed to support numerous retrievals of content in a short span of time should use the stateful model. An application that is designed to support more irregular or infrequent access should use the stateless model.
When the application is in debug mode, errors and exceptions are forwarded to standard content integration server exception handling JSPs. A descriptive HTML error page is returned to the user or application. By default, the URL Addressability application is in debug mode. If debug mode is turned off, errors and exceptions return the corresponding HTTP error code to the user or application. The settings are available in the web.xml file:
<init-param> <param-name>goToErrorPage</param-name> <param-name>true</param-value> </init-param>
<init-param> <param-name>goToErrorPage</param-name> <param-name>false</param-value> </init-param>
When debug mode is turned off, any individual request can be submitted with debug mode by adding DEBUG to the URL.
Here is an example URL to retrieve the native content for the vbr:/Engineering/090000028007f032/1.0/CONTENT content item in DEBUG mode:
http://localhost:9081/urladdr/NATIVECONTENT/DEBUG/?URN=vbr:/Engineering/090000028007f032/1.0/CONTENT
Here is an example URL to retrieve the XML representation of the content item vbr:/Legal/003775106/3/CONTENT in DEBUG mode:
http://localhost:9081/urladdr/ITEM/DEBUG/?URN=vbr:/Legal/003775106/3/CONTENT
