-
Log in to SkyVault Share:
- Open a web browser and enter the URL: http://localhost:8080/share
- If prompted, log in with the user name admin and password admin.
- Click the Repository link in the Share header.
- Navigate to Data Dictionary > Web Scripts Extensions > org > example.
-
Create a web script response template for your Folder Listing example:
- In the Create menu, select Plain Text.
- Enter the name for the web script in the Name field: dir.get.html.ftl
-
Type the following in the content box:
<html> <head> <title>Folder ${folder.displayPath}/${folder.name}</title> </head> <body> <p>SkyVault ${server.edition} Edition v${server.version} : dir</p> <p>Contents of folder ${folder.displayPath}/${folder.name}</p> <table> <#list folder.children as child> <tr> <td><#if child.isContainer>d</#if></td> <#if verbose> <td>${child.properties.modifier}</td> <td><#if child.isDocument> ${child.properties.content.size}</#if></td> <td>${child.properties.modified?date}</td> </#if> <td>${child.name}</td> </tr> </#list> </table> </body> </html>
- Click Create.
- Navigate to the org/example folder using the breadcrumb trail.
The component script file name dir.get.html.ftl, adheres to the naming convention defined by the Web Script Framework. All response template file names must end with .ftl. The <web script id> identifies the web script and must be the same as the web script ID defined in the file name of the associated web script description document. The <http method> specifies which HTTP method will initiate the web script and again must be the same as the associated web script description document. The format rendered by the response template is represented by <format>, the Web Script Framework abbreviation for a MIME type.
- /org/example/dir.get.desc.xml
- /org/example/dir.get.js
- /org/example/dir.get.html.ftl The Web Script Framework knows that all of these files are related to the same web script as they share web script package, web script ID, and HTTP method.