tangollama
03-05-2003, 06:15 AM
I am writing a laszlo component that interacts with an existing Servlet application. In previous posts, I've requested help in executing the following statement.
LzBrowser.loadURL("javascript:window.setDesktop(document.changeDeskto pFrm,null,'"+nameId+"')");
which now appears to be executing and my browser url is saying that the changes has been implemented. And the browser appears to be refreshing. However, some very strange behavior is occurring in my application after executing that command through the Laszlo-built flash component.
For instance, there are two "desktops" (I build portal software) that I'm hitting with can be accessed via the following 2 urls:
<server>/desktop/home
<server>/desktop/home2
If I go put <server>/desktop/home in the location bar and hit enter the following log statements are generated:
[11] Mar 5, 2003 9:08:05 AM com.commnav.sbh.servlets.ControlServlet doPost
FINEST: Desktop reference of: home
418327 [tcpConnection-8014-0] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 21 - GET request from: 198.70.184.102
418327 [tcpConnection-8014-0] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 21 - Request for /home/jworrall/resin/webapps/mars/templates/jworrall/menubar.lzx
.... more laszlo debug statements
The first 2 lines are logging in my framework that is telling me that the "home" desktop has been requested/will be served
However when I click the "home" link in the Laszlo application that says that its taking me to the same url (<server>/desktop/home), the home desktop is not given to me (it simply refreshes the same page) and I get the following logging statements:
692950 [tcpConnection-8014-2] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 23 - GET request from: 198.70.184.102
692952 [tcpConnection-8014-2] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 23 - Request for /home/jworrall/resin/webapps/mars/templates/jworrall/menubar.lzx
692982 [tcpConnection-8014-2] INFO com.laszlosystems.compiler.Compiler 198.70.1
It appears the laszlo LzBrowser is somehow circumventing the JSP Filters I have that intercept desktop requests. Is this the case?
For further reference, here is the Javascript function that the Laszlo component is theoretically calling in the surrounding page:
function setDesktop(formObj,desktop,nameid) {
if (desktop) {
formObj.desktopid.value = desktop;
} else {
formObj.desktopid.value = null;
}
if (nameid) {
formObj.action = formObj.action + '/' + nameid;
}
formObj.submit();
}
LzBrowser.loadURL("javascript:window.setDesktop(document.changeDeskto pFrm,null,'"+nameId+"')");
which now appears to be executing and my browser url is saying that the changes has been implemented. And the browser appears to be refreshing. However, some very strange behavior is occurring in my application after executing that command through the Laszlo-built flash component.
For instance, there are two "desktops" (I build portal software) that I'm hitting with can be accessed via the following 2 urls:
<server>/desktop/home
<server>/desktop/home2
If I go put <server>/desktop/home in the location bar and hit enter the following log statements are generated:
[11] Mar 5, 2003 9:08:05 AM com.commnav.sbh.servlets.ControlServlet doPost
FINEST: Desktop reference of: home
418327 [tcpConnection-8014-0] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 21 - GET request from: 198.70.184.102
418327 [tcpConnection-8014-0] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 21 - Request for /home/jworrall/resin/webapps/mars/templates/jworrall/menubar.lzx
.... more laszlo debug statements
The first 2 lines are logging in my framework that is telling me that the "home" desktop has been requested/will be served
However when I click the "home" link in the Laszlo application that says that its taking me to the same url (<server>/desktop/home), the home desktop is not given to me (it simply refreshes the same page) and I get the following logging statements:
692950 [tcpConnection-8014-2] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 23 - GET request from: 198.70.184.102
692952 [tcpConnection-8014-2] INFO com.laszlosystems.servlets.LZServlet 198.70.184.102 23 - Request for /home/jworrall/resin/webapps/mars/templates/jworrall/menubar.lzx
692982 [tcpConnection-8014-2] INFO com.laszlosystems.compiler.Compiler 198.70.1
It appears the laszlo LzBrowser is somehow circumventing the JSP Filters I have that intercept desktop requests. Is this the case?
For further reference, here is the Javascript function that the Laszlo component is theoretically calling in the surrounding page:
function setDesktop(formObj,desktop,nameid) {
if (desktop) {
formObj.desktopid.value = desktop;
} else {
formObj.desktopid.value = null;
}
if (nameid) {
formObj.action = formObj.action + '/' + nameid;
}
formObj.submit();
}