ImportTool - Documentation topics on: import and export of dotcms content,importtool,velocity tools,.


The Import Tool is a general-purpose text-importing view tool, which allows you to import the contents of a text file into your page.

Note: Text imported using the Import Tool will be passed through both the Velocity and HTML parsers. For information on how to prevent imported text from being intepreted, please see the Preventing Parsing documentation.


$ URL, Timeout )


URLRequiredSpecifies the URL of the resource to import.
To import the contents of a text file, upload a file into dotCMS and specify the URL of the uploaded file.
Timeout15000Timeout in milliseconds.


  • The timeout is specified in milliseconds (not seconds).
  • The timeout value is optional.
    • If no timeout value is specified, the default timeout (normally 15000) is used.
    • The default value may be changed by modifying the URL_CONNECTION_TIMEOUT property found in the file.
  • The timeout specifies the total time to wait to both make the connection perform the read.
    • The Import Tool will automatically kill the connection after the specified time, regardless of what state the import is in.
    • Therefore the timeout should be greater than the time it takes for both the connection and read.


Default Timeout

The following method inserts the contents of the URL into the page, using the default timeout:


Specify Timeout and Prevent Parsing

The following imports the same URL, with a timeout ensuring that the connection will be terminated after 3 seconds, and enclosed with formatting commands to ensure the imported text is not interpreted by the Velocity parser:

    $"", 3000)

For more information on how to escape imported text to avoid parsing, please see the Preventing Parsing section of the Include of a .vtl or .html file documentation.

Toolbox.xml Configuration

The Import Tool is enabled by default in dotCMS. To ensure the Import Tool is enabled, verify that the following lines exist in your toolbox.xml file:



For complete documentation on this viewtool, please see the following documentation: