Skip to main content
Skip table of contents

Use Direct URLs to Open a Specific Database or Table - SuperWEB2

The standard way for a user to access SuperWEB2 is to start by loading the login screen, and then select the database or table they want to work with from the Data Catalogue.

As an alternative, you can provide users with special URLs that take them directly to a specific database or table. For example, you can use this feature if you want to include direct links to specific databases or tables on your website or intranet.

There is no configuration required for this feature, you just need to know the ID of the database or table you want to direct the user to. Once you have the ID, you can construct the links as follows:

To Link To...Add the following to the end of the SuperWEB2 URL...Example URL
Database/opendatabase?id=<database_id> http://mysuperweb2.com/webapi/opendatabase?id=bank
System Defined Table/opensystemtable?id=<table_id> http://mysuperweb2.com/webapi/opendatabase?id=Customer Profit by Location
User Saved Table/openusertable?id=<table_id> http://mysuperweb2.com/webapi/openusertable?id=Gender by Marital Status
The Database Catalogue/homehttp://mysuperweb2.com/webapi/home

How Do I Find the Database or Table ID?

TypeTo Find The ID
DatabaseLog in to the SuperADMIN console and use the cat command.
System Defined Table (a TXD file installed on the SuperWEB2 server )Check the TXD filename. The ID is the same as the TXD filename (without the .txd extension).
User Saved TableCheck the My Tables tab. The ID is the same as the name shown in the list of tables.

The table and database IDs are not case sensitive.

Will the User Need to Log In?

If...And...Then...
The user is already logged in to SuperWEB2 in the current browser sessionThe logged in user has permission to access the linked database or tableThe user will not need to log in. The link will go directly to the database or table.
The user is already logged in to SuperWEB2 in the current browser sessionThe logged in user does not have permission to access the linked database or tableThe link will take the user to the Data Catalogue. A message will display indicating that the user does not have permission to access this database or table.
The user is not logged in to SuperWEB2

The guest user account has permission to access the linked database or table

The user will not need to log in. The link will go directly to the database or table in guest user mode.
The user is not logged in to SuperWEB2

The guest user account does not have permission to access the linked database or table (e.g. it is a user saved table)

The link will take the user to the log in page.

  • If the user logs in using an account that has permission to access the linked database or table, then the user will go straight there after logging in.
  • If the user logs in using an account that does not have permission to access the linked database or table, then the user will go to the Data Catalogue. A message will display indicating that the user does not have permission to access this database or table.

Using POST with Direct URLs

From SuperSTAR version 8.0.4.9 onwards, the system direct URLs also support HTTP POST actions. You can use this feature to construct an external login form on your website that sends the user directly to a particular database or table after logging in.

The following example HTML code creates a login form that will direct the user straight to the Retail Banking database after logging in:

XML
<form action="http://mysuperweb2.com/webapi/opendatabase?id=bank" method="post">
    <input type="text" name="username" value="" />
    <input type="password" name="password" value="" />
    <input type="submit" value="Submit" />
</form>

You can copy this code to your own HTML page. Simply change the action element on the <form> tag to the direct URL you want to use.

Creating a Custom External Login Form

You can use this feature to create a custom login form that is hosted on a different website to SuperWEB2. If you want to do this then you may also want to change the SuperWEB2 configuration setting that controls the location of the SuperWEB2 login page.

This setting determines which page is loaded:

  • When a user logs out of SuperWEB2.
  • When a user's SuperWEB2 session times out.
  • When a user attempts to access a direct URL that requires a login.

To make this change:

  1. Open <tomcat_home>\webapps\webapi\WEB-INF\web.xml in a text editor.

    Make a backup copy of this file before making any changes.

  2. Locate the following section:

    XML
        <context-param>
            <description>
                The page which the user is redirected to if they do not have a valid login (timeout) or they clicked the log out button.
            </description>
            <param-name>logoutRedirectionURL</param-name>
            <param-value>login.xhtml</param-value>
        </context-param> 

    By default, the logout redirection URL is set to login.xhtml (the standard SuperWEB2 login page).

  3. Change the parameter to the location of your alternative login page. For example:

    XML
         <context-param>
            <description>
                The page which the user is redirected to if they do not have a valid login (timeout) or they clicked the log out button.
            </description>
            <param-name>logoutRedirectionURL</param-name>
            <param-value>http://myserver/superweb2.html</param-value>
        </context-param> 
  4. Save your changes to the file and restart Tomcat or the SuperWEB2 service.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.