Basic VSP Programming
VS-B-1 Making an Executable Directory
Making an executable directory in Virtuoso's Web server space.
Preliminaries
It is necessary to complete the configuration of the executable directory before any of the subsequent tutorials will function. It is therefore important to follow these steps carefully before trying to run the vs_b_1.vsp file.
The example demonstrated here creates an executable directory depending on either tutorial_dav.vad package was installled (i.e. the tutorials are in the DAV repository) or the tutorial_filesystem.dav package ( the tutorials have FS location.)
These tutorials are designed for use on an OpenLink Virtuoso V3.0 VDBMS. Earlier versions will not work.
Login to the Conductor UI using the dba account.
Create the database user account vspdemo
- Go to "System Admin" tab and then go to the "User Accounts" tab.
- Click the "Create New Account" link.
- Enter for Account Name "vspdemo" and a desired password with confirmation. Check the check-box for "Allow SQL/ODBC Logins". Leave the rest of the fields at their default.
- Press the "Save" button. You will see the vspdemo now listed under current user accounts.
Check tutorials type and path of installation (DAV or FS)
- Go to "Database" tab and then go to the "Interactive SQL" tab.
- Enter in the text area the following:
select TUTORIAL_VDIR_DIR();
- Click the "Execute" button.
- The found result will be the tutorials Path location.
- Click the button "Return".
- Enter in the text area the following:
select TUTORIAL_IS_DAV();
- Click the "Execute" button.
- The returned result will be the tutorials Type location: 1 - tutorials are installed in DAV, or 0 - tutorials are installed in the local FS.
Allow VSP files to be run by vspdemo user with directory browsing allowed
- Go to "Web Application Server" tab and then go to the "Virtual Domains & Directories" tab.
- From the given list of HTTP Hosts click the icon in front of the Interface value.
- Click the "Add new directory" link.
- If tutorials Type location is FS, then choose the "File System" type and press the button "Next>>"; If tutorials Type location is DAV, then choose the "WebDAV domain" type and press the button "Next>>".
- Enter "/vs_b_1" for Path, Enter the tutorials Path location with "/tutorial/web/" at the end for physical path (for ex. /vad/vsp/tutorial/web/ or /DAV/VAD/tutorial/web/), select "vspdemo" for the VSP user, select "Allow Directory Browsing" checkbox and then press the "Save Changes" button.
To test the new directory: enter the "http://host:port/vs_b_1" in browser. For example http://localhost:8889 as the URL. If all is ok, the content of the web tutorial directory is shown.
Equivalent SQL commands to achieve executable directory
- Connect to the Virtuoso server via ISQL utility as DBA user.
- Create the user "vspdemo"
SQL> create user vspdemo; SQL> user_set_qualifier ('vspdemo', 'vspdemo'); - Create the virtual directory with user for execution "vspdemo"
SQL> VHOST_REMOVE (vhost=>'*ini*',lhost=>'*ini*',lpath=>'/vs_b_1'); SQL> vhost_define (vhost=>'*ini*',lhost=>'*ini*',lpath=>'/vs_b_1', ppath=>TUTORIAL_VDIR_DIR() || '/tutorial/web/',vsp_user=>'vspdemo', is_brws=>1, is_dav=>TUTORIAL_IS_DAV());
| View the source | Action |
|---|---|
| 1. vs_b_1.sql | Set the initial state |
| 2. goto /vs_b_1 | Run |
OpenLink Home
Technical Support