Working with Actuate Java Components URIs
Actuate Java Components Uniform Resource Identifiers (URIs) convey user requests to an application or web server. URIs access functionality including generating reports, managing repository contents, and viewing reports.
About Actuate Java Components URIs
Actuate Java Components URIs consist of the context root and port of the web server where you install and deploy the JSPs or servlets. Actuate Java Components URIs have the following syntax:
http://<web server>:<port>/<context root>
/<path><page>.<type>[?<parameter=value>{&<parameter=value>}]
where
*<web server> is the name of the machine running the application server or servlet engine. You can use localhost as a trusted application’s machine name if your local machine is running the server.
*<port> is the port on which you access the application server or servlet engine.
*<context root> is the context root for accessing the Actuate Java Components pages, which by default is the name of the WAR or EAR file.
*<path> is the directory containing the page to invoke.
*<page> is the name of the page or method.
*<type> is jsp or do.
*<parameter=value> specifies the required parameters and values for the page.
For example, to view the document list page, Actuate Java Components accepts a URI with the following format:
http://<web server>:<port>/ActuateJavaComponent
/getfolderitems.do?doframe=true&userid=anonymous
where
*ActuateJavaComponent/getfolderitems.do is the JSP that provides file browsing for Java Components.
*doframe=true is a reserved parameter that displays the documents page in a frame next to other frames for the banner and file explorer tree.
*userid=anonymous indicates that the default anonymous user is being used and security is not enabled. This is the default security setting for Actuate Java Components. For information about customizing security, see Chapter 9, “Using Actuate Java Components security.”
Using a special character in a URI
Actuate Java Components URIs use encoding for characters that a browser can misinterpret. You use hexadecimal encoding in these circumstances to avoid misinterpretation. Use the encoding only when the possibility of misinterpreting a character exists. Always encode characters that have a specific meaning in a URI when you use them in other ways. Table 1‑1 describes the available character substitutions. An ampersand introduces a parameter in a URI, so you must encode an ampersand that appears in a value string. For example, use:
&company=AT%26T
instead of:
&company=AT&T
Table 1‑1 Encoding sequences for use in URIs 
Character
Encoded substitution
ampersand (&)
%26
asterisk (*)
%2a
at (@)
%40
backslash (\)
%5c
colon (:)
%3a
comma (,)
%2c
dollar sign ($)
%24
double quote (")
%22
equal (=)
%3d
exclamation (!)
%21
greater than (>)
%3e
less than (<)
%3c
number sign (#)
%23
percent (%)
%25
period (.)
%2e
plus (+)
%2b
question mark (?)
%3f
semicolon (;)
%3b
slash (/)
%2f
space ( )
%20
underscore (_)
%5f
If you customize Actuate Java Components by writing code that creates URI parameters, encode the entire parameter value string with the encode( ) method. The encode( ) method is included in encoder.js, which is provided in the Actuate Java Components <context root>/js directory. The following example encodes the folder name /Training/Sub Folder before executing the getFolderItems action:
<%-- Import the StaticFuncs class. --%>
<%@ page import="com.actuate.reportcast.utils.*" %>
<%
String url =
"http://localhost:8080/ActuateJavaComponent/getfolderitems.do
?folder=" + StaticFuncs.encode("/Training/Sub Folder");
response.sendRedirect(url);
%>
The encode(  ) method converts the folder parameter value from:
/Training/Sub Folder
to:
%2fTraining%2fSub%20Folder
About UTF-8 encoding
UTF-8 encoding is also the default encoding that web browsers support. All Java Components communicate using UTF-8 encoding. For 8-bit (single byte) characters, UTF-8 content appears the same as ANSI content. If, however, extended characters are used (typically for languages that require large character sets), UTF-8 encodes these characters with two or more bytes.