Page Engine

The iKnowBase Page Engine is the server component responsible for handling web requests from clients (web browsers, tablets, smart phones, etc). The Page Engine will find the proper page, and return it to the client.

General use

The basic use of the page engine is to parse the URL, find the page requested, build the page content, and return it to the client. The page engine is available both at the application root, and under the “/page” endpoint.

For example, if the iKnowBase web application with Viewer module is mounted on “/”, both of the following requests will find the page “/about”, and return to the client:

/about
/page/about

Normally, you will use the root-based mountpoint (/about). However, there are some other services that have higher priority, such as the content server on /Content. Therefore, it is not possible to access a page named “/Content” using “/Content”, and you will have to use the specific endpoint “/page/Content”.

Language support

When a user first accesses the Page Engine, he will get a user session. One of the items stored in the session is the current language, where the initial value is decided from the domain configuration, the user settings or the user browser. However, the session language can be changed at runtime, valid only for that session.

For developers, the console available at /ikb$console provides a mechanism for changing the user language. This is readily available under the “developer” tab, and is very convenient for testing.

For application development, the language can also be changed using the URL-parameter “_ikbLanguageCode”, with the value set to one of the available language codes. Use the URL-parameter on any page-request; the following two examples will change the language to Norwegian or English:

/about?_ikbLanguageCode=n
/page/about?_ikbLanguageCode=us

Database trace functionality

The page engine (and really most of the iKnowBase infrastructure) uses a single database connection per request. It is possible to ask that all sql executed by that request should be traced in the Oracle database.

To enable tracing for a single request, use the optional URL parameter “_ikbRequestTracefile=trace_identifier”, as follows:

/page/frontpage?_ikbRequestTracefile=frontpage

Then, the database will create a trace file to the default trace location (which varies between database installations), using the specified trace identifier. For example, on an 11g installation this could be “/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4851_frontpage.trc”.

Refresh content cache

Page components that are configured to use content caching will automatically deliver their content from cache, whenever the cache is present and valid (not expired). However, it is possible to ask that a single request should refresh all content, and not delivered anything from cache.

To enable cache refresh for a single request, use the optional URL parameter “_ikbRefreshContentCache=true”, as follows:

/page/frontpage?_ikbRefreshContentCache=true

You may also use the “refreshCache” option on the loadComponent javascript-api, which in fact adds a “_ikbRefreshContentCache” parameter under the hood:

iKnowBase.PageEngine.reloadComponent ({
    pageComponent: "ikb4",
    refreshCache: true
})