Work with dynamic JavaScript pages dynamic-javascript-pages

About dynamic JavaScript pages about

Dynamic JavaScript pages (JSSP) let you build server-side pages that generate dynamic content when accessed through a URL, such as custom APIs, exports, or web application logic. These pages are stored in the Administration > Dynamic JavaScript pages menu in the left navigation pane.

Dynamic JavaScript pages list interface showing available options

From the dynamic JavaScript pages list, you can:

  • Duplicate or delete a page: Click the ellipsis button, and select the desired action.
  • Modify a page: Click a page’s name to open its properties, make your changes, and save.
  • Create a new dynamic JavaScript page: Click the Create Dynamic JavaScript page button.

Create a dynamic JavaScript page create

To create a dynamic JavaScript page, follow these steps:

  1. Navigate to the Dynamic JavaScript pages menu, and click the Create Dynamic JavaScript page button.

  2. Define the page’s properties:

    • Namespace: Specify the namespace relevant to your custom resources. By default, the namespace is “cus”, but it may vary depending on your implementation.
    • Name: The unique identifier used to reference the page.
    • Label: The descriptive label displayed in the dynamic JavaScript pages list.

    Dynamic JavaScript page creation interface showing namespace, name, and label fields

    note
    NOTE
    Once created, the Namespace and Name fields cannot be modified. To make changes, duplicate the page and update as needed.
  3. Click the Create code button to define the page’s content, then write your JSSP code using <%@ page %> directives and NL.require() calls to load core libraries.

    Dynamic JavaScript page code editor

  4. Click Confirm to save your code.

  5. When your dynamic JavaScript page is ready, click Create. The page is now accessible at a URL built from its namespace and name, in the format https://<your-instance>/<namespace>/<name>. For example, a page named recipientAPI.jssp in the cus namespace is accessible at https://<your-instance>/cus/recipientAPI.jssp.

For more information on reusable JavaScript functions, refer to Work with JavaScript codes.

recommendation-more-help
campaign-web-help-v8