I don't know if this will help your situation or not but this is the code
that we use to load our dataset URLs from an external XML file. We need to
do this because we test our app locally as a proxied app, but deploy it as a
SOLO app. A solo app requires the URLs to be relative. Having the URLs in
an external file allows us to swap out the URLs by changing that file. No
need to touch the code...
This is the code in "canvas"...
<dataset name="ds_paths" request="true" type="http" src="paths.xml" />
<dataset name="ds1"/>
<datapointer xpath="ds_paths:/paths/ds1">
<method event="ondata">
parent.ds1.setAttribute( 'src', this.getNodeText() );
</method>
</datapointer>
<dataset name="ds2"/>
<datapointer xpath="ds_paths:/paths/ds2">
<method event="ondata">
parent.ds2.setAttribute( 'src', this.getNodeText() );
</method>
</datapointer>
<dataset name="ds3"/>
<datapointer xpath="ds_paths:/paths/ds3">
<method event="ondata">
parent.ds3.setAttribute( 'src', this.getNodeText() );
</method>
</datapointer>
The contents of paths.xml looks something like this...
<paths>
<ds1>
http://www.domain.com/dsservlet/getds1</ds1>
<ds2>
http://www.domain.com/dsservlet/getds2</ds2>
<ds3>
http://www.domain.com/dsservlet/getds3</ds3>
</paths>
Hmm... looking at the datapointer code above, it could
probably simplified a little too...
<datapointer xpath="ds_paths:/paths/ds1"
ondata="parent.ds1.setAttribute('src',this.getNodeText())" />
be written to the source directory, and you can fetch that directly,
bypassing the
compiler's check for up-to-dateness.
If you are compiling a proxied app, you can grab the raw swf using wget or
the command line lzc compiler tool and reference that directly from your own
HTML wrappre page. It is only when you fetch *.lzx that the LPS server might
attempt to recompile.
On 4/3/06, Andy Chandler <achandler@visionael.com> wrote:
(I keep forgetting to use the correct account to send to the list -
apologies if this winds up coming through twice)
I was asked to pass this question along to the list :
We have a fairly large/complicated application and it has been
observed that whenever a user visits a page for the first time it can take
around 15 seconds for the page to load - thereafter it loads much quicker.
We believe it is due to compilation or perhaps loading the swf into a cache
on the tomcat side of the equation and we were looking to see how we could
avoid that step if the resource hasn't been updated since the last
compilation or if its caching is there any way to pre-load it?