WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:HTML Redirect
Description:Create an HTML document that automatically redirects to another URL
Id:core:web:redirectHTML
Category:accessor
Identifier Syntax

HTML Redirect is an accessor using Active URI syntax with the following base identifiers:

Base
active:redirectHTML

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
url
Mandatory
Representation (java.lang.Object)URL to redirect to
seconds
Optional
Representation (java.lang.Object)Time in seconds before redirect occurs
body
Optional
Representation (java.lang.Object)HTML body to display before redirecting
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use HTML Redirect accessor you must import the module urn:org:netkernel:web:core:

<import>
  <uri>urn:org:netkernel:web:core</uri>
</import>

active:redirectHTML creates an HTML page that will automatically redirect to a specified URL.

The response representation is a java.lang.String

Arguments

  • url - this is the identifier of the URL to redirect to
  • seconds - this is a integer value, expressed as an identifier, and is the delay for the browser to wait before redirecting.
  • body - this is a resource that will be sourced as String and used as the body of the HTML page.

Example

This DPML script creates an HTML redirect to the NetKernel admin home page...

<sequence>
  <request assignment="response">
    <identifier>active:redirectHTML</identifier>
    <argument name="seconds">
      <literal type="absolute-identifier">5</literal>
    </argument>
    <argument name="url">http://localhost:1060/</argument>
    <argument name="body">
      <literal type="xml">
        <body>
          <h2>You are about to redirect...</h2>
        </body>
      </literal>
    </argument>
  </request>
</sequence>