ADC

Import and export files

You can import HTML or XML error objects, XML schemas, DTDs, and WSDLs to the Web App Firewall by using the GUI or the command line. You can edit any of these files in a web-based text area after importing them, to make small changes directly on the NetScaler instead of having to make them on your computer and then reimport them. Finally, you can export any of these files to your computer, or delete any of these files, by using the GUI.

Note:

You cannot delete or export an imported file by using the command line.

To import a file by using the command line interface

At the command prompt, type the following commands:

  • import appfw htmlerrorpage <src> <name>
  • <save> ns config

Example

The following example imports an HTML error object from a file named error.html and assigns it the name HTMLError.

import htmlerrorpage error.html HTMLError
save ns config
<!--NeedCopy-->

To import a file by using the GUI

Before you attempt to import an XML schema, DTD, or WSDL file, or an HTML or XML error object from a network location, verify that the NetScaler can connect to the Internet or LAN computer where the file is located. Otherwise, you cannot import the file or object.

  1. Navigate to Security > NetScaler Web App Firewall > Imports.

  2. Navigate to Application Firewall > Imports.

  3. In the Application Firewall Imports pane, select the tab for the type of file you want to import, and then click Add.

    The tabs are HTML Error Page, XML Error Page, XML Schema or WSDL. The upload process is identical on all four tabs from the user point of view.

  4. Fill in the dialog fields.

    • Name—A name for the imported object.

    • Import From—Choose the location of the HTML file, XML file, XML schema or WSDL that you want to import in the drop-down list:

      • URL: A web URL on a website accessible to the appliance.
      • File: A file on a local or networked hard disk or other storage device.
      • Text: Type or paste the text of the custom response directly into a text field in the GUI.

      The third text box changes to the appropriate value. The three possible values are provided below.

    • URL—Type the URL into the text box.

    • File—Type the path and filename to the HTML file directly, or click Browse and browse to the HTML file.

    • Text—The third field is removed, leaving a blank space.

  5. Click Continue. The File Contents dialog is displayed. If you chose URL or File, the File Contents text box contains the HTML file that you specified. If you chose Text, the File Contents text box is empty.

  6. If you chose Text, type or copy and paste the custom response HTML that you want to import.

  7. Click Done.

  8. To delete an object, select the object, and then click Delete.

To export a file by using the GUI

Before you attempt to export an XML schema, DTD, or WSDL file, or an HTML or XML error object, verify that the Web App Firewall appliance can access the computer where the file is to be saved. Otherwise, you cannot export the file.

  1. Navigate to Security > Web App Firewall > Imports.

  2. In the Web App Firewall Imports pane, select the tab for the type of file you want to export.

    The export process is identical on all four tabs from the user point of view.

  3. Select the file that you want to export.

  4. Expand the Action drop-down list, and select Export.

  5. In the dialog box, choose Save File and click OK.

  6. In the Browse dialog box, navigate to the local file system and directory where you want to save the exported file, and click Save.

To edit an HTML or XML Error Object in the GUI

You edit the text of HTML and XML error objects in the GUI without exporting and then reimporting them.

  1. Navigate to Security > NetScaler Web App Firewall > Imports, and then select the tab for the type of file that you want to modify.

  2. Navigate to Application Firewall > Imports, and then select the tab for the type of file that you want to modify.

  3. Select the file that you want to modify, and then click Edit.

    The text of the HTML or XML error object is displayed in a browser text area. You can modify the text by using the standard browser-based editing tools and methods for your browser.

    Note: The edit window is designed to allow you to make minor changes to your HTML or XML error object. To make extensive changes, you may prefer to export the error object to your local computer and use standard HTML or XML web page editing tools.

  4. Click OK, and then click Close.

Import and export files