Hello,
we are in a big project in wich we use OpenLaszlo (3.1.1) extensively. And 
right now we are stuck on a little problem. I don't know if this is the right 
place to post since it's not a pure "laszlo coding" problem, but... here is the 
question: when and exactly where are relative URL (in src of datasets) resolved 
to absolute ones? Right now, it seems they are resolved using server names, but 
we have a network in wich some computers, for various reasons, don't know how 
to match server names with ips. So, we need to resolve relative URLs with IPs 
rather than with server names. That is, we need 

... src = "/login.action"...

translated to

... src = "http://192.168.102.154/application/login.action";...

and not to

... src = "http://coolservername.here/application/login.action";...

Researching through Laszlo source code, we've found a class, 
"LZHttpUtils.java", with a method "modifyWEBAPP". This method assumes that if 
the URL begins with "/@WEBAPP@/", it's a relative URL. Here we can tweak the 
code to adjust to our necessities.


But... why is the code comparing the URL with the string "/@WEBAPP@/"? Who does 
prepend that "/@WEBAPP@/" literal in relative URLs? Should it be prepended "by 
hand" by the programmers? And if so, is it docummented in any place?

Any help would be very much appreciated. Thank you very much.

 

Jaime Armero Navarro

Programador
[EMAIL PROTECTED]

Tel. 902 525 777 · Fax 902 525 778  · Sede Central: Valencia (Av. Cataluña, 11 
- 46020 )
http://www.dimension-informatica.es <http://www.dimension-informatica.es/>  · 
Deleg.: Barcelona - Castellón - Madrid - Murcia - Vigo

·········································································································
 

Este mensaje y sus adjuntos, van dirigidos, de manera exclusiva, a su 
destinatario y contienen información confidencial y sujeta al secreto 
profesional, cuya divulgación no está permitida por la ley. En caso de haber 
recibido este mensaje por error, le rogamos que, de forma inmediata, nos lo 
comunique mediante correo electrónico y proceda a su eliminación, así como a la 
de cualquier documento adjunto al mismo. Asimismo, le comunicamos que la 
distribución, copia o utilización de este mensaje, o de cualquier documento 
adjunto al mismo, cualquiera que fuera su finalidad, están prohibidas por la 
ley. 

This message and its annexed, are intended exclusively for the person to whom 
it is addressed and contain privileged and confidential information protected 
from disclosure by law. If you are not the addressee indicated in this message, 
you should immediately delete it and any attachments and notify the sender by 
reply e-mail. In such case, you are hereby notified that any dissemination, 
distribution, copying or use of this message or any attachments, for any 
purpose, is strictly prohibited by law.

 

Attachment: correo.gif
Description: correo.gif

Reply via email to