Redirecting Application Link to Custom Page in Google Web Toolkit

Google Web Toolkit (GWT) allows you to develop a web based application in Java. Using Google Web Toolkit, you can enhance the custom page as per your requirement. It also reduces the loading time required for general interface.

Procedure

  1. Merge your web application war into EML.war inside ECM.ear. For more information, refer to Merging Custom Application.
    • If you use any of the TIBCO MDM classes such as IMqSessionProfile, you may have to build your application or servlet against TIBCO MDM classes.
    • If you use session ID of the currently logged in TIBCO MDM user, for example, while requesting a web service, then following code snippet is not required. You can get the session ID from HTTP session.
      String sessionId = request.getSession(false).getId();
  2. Extract information such as username, enterprisename, catalogname, and so on specific to the functionality, which you want to customize. Some of this information may be passed to the URL as request parameters; while the rest can be extracted from MqSessionProfile stored in the HTTP session.
    // Get User profile object stored in Http session
    IMqSessionProfile userProfile = (IMqSessionProfile)request.getSession().
                 getAttribute(IMqSessionProfile.SESSION_PROFILE);
    //Get informtion like username, enterprisename, sessionid
    String entepriseName = userProfile.getAttr("ENTERPRISE_NAME");
    String userName = userProfile.getAttr("USER_NAME");
  3. Add the relevant configuration for the new servlet into the web.xml in ECM.ear\EML.war\WEB-INF.
    <servlet id="Servlet_319"> 
          <servlet-name>GWTClient</servlet-name> 
          <servlet-class>com.tibco.mdm.ui.infrastructure.CimToGwtServlet</servlet-class>
    </servlet> 
  4. Update new EML.war into ECM.ear using the following parameter:
    %JAVA_HOME%\bin\jar -uvf ECM.ear EML.war
  5. Set the relevant properties using the Configurator (Advanced > UI Customization).

    For example, for redirecting to custom Add Record from a custom GWT based Add Page, enter GWTClient?action=addRecord next to the Add Record External URL property and press Enter. You need to append a different set of parameters to the specified custom page URL depending on the URL that is being customized. For more information, refer to Redirection from a Custom Page to the Application.

    If no values are set in these properties, the application uses default pages.

  6. Deploy the updated ECM.ear into the application server.
  7. Log on to the application by accessing the URL.
  8. Navigate to the screen which you have redirected to a custom page. For example, if you have redirected the Add Record screen to a custom page, navigate to the Add Record screen. The custom GWT page should be displayed.