Creating a custom Information Console web application : Customizing an Information Console web application : Locating existing pages and linking in new pages

Locating existing pages and linking in new pages

To locate an existing page, navigate to that page and examine the URI in the address field of your browser. If the URI contains a JSP name, go to that JSP file. If the URI contains an action path, search struts-config.xml for that action path without the .do extension, or look up the action path in Actuate Information Console URIs.

An action path is a uniform resource identifier (URI) called directly by Information Console or by a user to access the Information Console functionality. <context root>\WEB-INF\struts-config.xml contains the action path specifications.

An action path specifies a JSP to use in response to user controls. An action path uses the results of an Action class to determine the next action path to use or the next JSP to display. Typically, an action class indicates one action path or JSP if the execution succeeds and a different action path or JSP if the execution causes an error. In the following code sample, if the AcGetFolderItemsAction JavaBean executes successfully, the next JSP to display is <context root>\iportal\activePortal\private\filesfolders\filefolderlist.jsp:

<!-- Process getfolderitems -->
<action
  attribute="fileListActionForm"
  name="fileListActionForm"
  path="/getfolderitems"
  scope="request"
  type="com.actuate.activeportal.actions.AcGetFolderItemsAction"
  validate="false">
  <forward name="success"
    path="/iportal/activePortal/private/filesfolders
    /filefolderlist.jsp" />
  <forward name="dashboard" path="/dashboard" redirect="true" />
</action>

In the preceding example, the path for an error result is not listed. This means that it defaults to the definition in the global forwards section of struts-config.xml as a when an error occurs:

<forward name="error" path="/iportal/activePortal/private/common
  /errors/errorpage.jsp"/>

To add a forward command that activates when the JavaBean returns another result, such as viewroi, you can include a forward for that result to direct it accordingly, as shown in the following example:

<forward name="viewroi" path="/iportal/activePortal/viewer/viewframeset.jsp"redirect="true" />

To add a new web page to Information Console, you change the navigation in struts-config.xml to use the new JSP or path. You can change an existing input page or forward page specification in an action path to your new page, or you can create a new action path that forwards to your page. If you create a new action path, you can change another action path to forward to your new path or you can modify or create links on web pages to specify your new action path. The following action path always navigates to welcome.jsp when another action path, link, or URL invokes it:

<!-- Process welcome -->
<action path="/welcome"
  forward="/iportal/activePortal/private/welcome.jsp"
  name="welcome">
</action>\

For more information on action paths and Jakarta Struts, go to the following URL:

http://jakarta.apache.org/struts

(c) Copyright Actuate Corporation 2011