ankit rastogi schrieb:
Here is the coede through which I currently access this servlet.
This has hardcoded URL and I want to give relative stuff.

<library>
<dataset name="currentroleds" src=""font-weight: bold;">http://localhost:8080/gui/FetchRoleServlet" request="true"/>
<datapointer name="currentroledp" xpath="currentroleds:/*"/>
</library>

when I try something like http://../../../FetchRoleServlet
The debugger gives error that http://localhost:8080/Contextroot/resources/lzx/common/../../../FetchRoleServlet not found.
The easiest way would be something like that:

--------------- global functions.js ---------------
function getBaseUrl() {
  var url = "" LzUrl();
  url = "">
  //return whatever you like... i.e. omit path
  return url.protocol + "://"
    + url.host + ":" + url.port + url.path;
}


--------------- Laszlo App ---------------
<datasource name="ds">
  <method event="oninit">
    this.currentroleds.setSrc(getBaseUrl() + 'FetchRoleServlet');
    this.mapserverData.doRequest();
  </method>
  <dataset type="http" name="currentroleds"/>
</datasource>
<script src=""/>


Markus

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to