URL rewrite problem in .js Javascript libraries

Hi All,

I created a small HTML page that contained a javascript function to confirm that the portal rewrote the url inside the javascript function. This test worked as expected. I then removed the javascript function from the HTML page and put it in a separate javascript library (i.e. library.js) and included the .js library from the HTML page. This test failed.

All the URLs on the HTML page were re-written, as expected, but the .js library file was untouched.

These tests confirm to me that the portal gateway does NOT re-write URLs contained in separate .js javascript libraries that are included from an HTML page.

At this point, I am quite certain that the portal server either a) does NOT re-write URLs in .js javascript libraries, or b) does re-write the URLs in these libraries but needs to be explicitly configured to do so, which in our case, must not be configured

properly. So we need help to determine what it does or does not support and/or what gateway configuration changers are needed.

Our Javascript libraries are included as follows:

-

<script language="Javascript">

DynAPI.setLibraryPath('/apps/js/lib/');

DynAPI.include('dynapi.api.*');

DynAPI.include('dynapi.ext.inline');

DynAPI.include('dynapi.ext.keyevents');

DynAPI.include('apps.util.mouseEvents');

DynAPI.include('apps.util.validate');

DynAPI.include('apps.util.validators');

DynAPI.include('apps.util.formUtils');

DynAPI.include('apps.util.imageSwap');

DynAPI.include('apps.util.dateField');

DynAPI.include('apps.gui.button');

DynAPI.include('apps.gui.tooltip');

DynAPI.include('apps.gui.toolbar');

DynAPI.include('apps.util.twoList');

</script>

Question: Does portal gateway support the re-write of URLs in .js javascript libraries, Or do we need to explicitly configure the gateway for each library include?

Look forward to your reply.

Chris Wilt

TransCanada

[2085 byte] By [708934] at [2007-11-25 4:36:57]
# 1

From the gateway side there is no option to specify specific files/libraries to rewrite. Enable debugging on the gateway and take a look at the iwtGateway logs present in /var/opt/SUNWips/debug directory. The gateway logs will indicate how the gateway is handling this javascript, and see if you can tweak the rules to make this work ..

We have also observed that different browsers handle the same javascript differently. It depends on how the javascript is referred in your html ..

Its hard to give you more specifics without looking your iwtGateway logs in detail ..

Karthik_Krishnamoorthy at 2007-6-29 3:07:37 > top of Java-index,Web & Directory Servers,Portal Servers...