Use the Firewall parameter in the [Jadehttp Files] section of the JadeHttp initialization file or the Firewall configuration directive in the JADE mod_ jadehttp module to control whether JADE uses this facility for its automatic HyperText Markup Language (HTML) generation. When this parameter or directive is set to the default value of false, files are written directly to the virtual directory by JADE.
When you set this parameter or directive to true and the
The
The createVirtualDirectoryFile method has the following signature:
createVirtualDirectoryFile(fileName: String; fileContents: Binary; retain: Boolean): Integer;
The createVirtualDirectoryFile method parameters are listed in the following table.
Parameter | Description |
---|---|
fileName | Name of the file to be created in the virtual directory |
fileContents | Binary holding the file contents |
retain | Creates read-only files when set to true or standard files when set to false |
The JadeHttp library creates the specified file in the directory (the virtual directory visible to Web browsers) in which the library is running. This method returns zero (0) if the method successfully formats a request to the JadeHttp library or it returns the non-zero Windows error code indicating the failure to create the file.
The image files must be passed before the final reply to the Web request is returned.
This process is transparent to you if your application is using the standard JADE generated Internet facility. However, if your application logic does additional file generation of its own, you must call the
For Web services applications, the virtual directory parameter must be specified and the fileName parameter contains only the file name. When an application transfers files to the jadehttp library by using the createVirtualDirectoryFile method for non-Web services applications, the directory that is used is determined as follows.
If the file name specified in the fileName parameter includes a directory, the file is written into that directory.
If the file name does not include a directory and the application’s section of the jadehttp.ini file or the JADE mod_ jadehttp module contains a directory value for the VirtualDirectory parameter or PhysicalDirectory directive, respectively, the files are written into that directory.
If neither the file name nor the [application-name] section of the jadehttp.ini file or the directive ApplicationType in the JADE mod_ jadehttp module contains a directory, the files are written into the same directory as the jadehttp library module. (This enables you to control directory permissions so that the directory containing the jadehttp library module does not need to have read and write access.)
Use the
Call the
The deleteVirtualDirectoryFile method parameters are listed in the following table.
Parameter | Description |
---|---|
fileName | Name of the file to be deleted from the virtual directory |
deleteIfReadOnly | Deletes files marked as read-only when set to true |
This method returns zero (0) if the file deletion is successful or it returns a non-zero error code if the deletion fails.
If your applications are not using the standard JADE generated Internet facility, you need to set the Firewall parameter in the [Jadehttp Files] section of the jadehttp.ini file or the Firewall configuration directive in the JADE mod_ jadehttp module and the [
The file cleanup process that is started when the jadehttp.ini file Firewall parameter or the JADE mod_ jadehttp module Firewall configuration directive is set to true deletes only files that are not read-only and which are of type .jpg, .png, or .gif. You should therefore make all other files in this directory that you want to retain read-only, by setting the retain parameter to true.