PDA

View Full Version : Lazslo config problem?


scheidecker
10-23-2004, 10:01 PM
Hello,

Installing Lazslo as described in the manual, all the examples seem to work just fine.

However, under /lps2-2/Server/lps-2.2/examples/ there is a hello.jsp ,that is supposed to produce a LZX application, that is create a lazslo app dynamicaly. This is the one I am particularly interested on.

But running it, instead of creating a canvas and a window, it only outputs the following string as if it was a html page:

Current date and time: Oct 23, 2004 11:53:01 PM Session id is: 3D2FD485D79897849B98AD61E811CFD0 Parameters:

Is there anything wrong in the configuration or something else that should be done to make the jsp generate a lazslo app?

Thanks in advance.

bloch
10-23-2004, 10:05 PM
try http://localhost:8080/lps-2.2/examples/hello.jsp.lzx?lzt=source

to see the source code.

FYI, this style of laszlo app works minimally but isn't really recommended nor has Laszlo ever support ed it. There are numerous reasons why you wouldn't want the compiler to be engaged on every application access right now (compiler is too slow and uses too much memory, compilation locks the server) although... for some situations this might be ok.

-Eric

scheidecker
10-23-2004, 10:21 PM
Yes,

Thanks for the information. I know how to see the source but my question is regarding to the hability of jsp to generate a lzx dynamically as the example source code states. That's what I need. Is there any configuration to Tomcat or anything wrong with this jsp so that the canvas could be output to the browser?

Thanks.

bloch
10-23-2004, 10:23 PM
http://localhost:8080/lps-2.2/examples/hello.jsp.lzx

will do it.

If the LPS gets an url that ends in .lzx for a file that doesn't exist, it strips off the .lzx and does a GET of that url... hoping to find an LZX program there to compiler.

-E

d~l
10-24-2004, 05:57 AM
bloch wrote ..

FYI, this style of laszlo app works minimally but isn't really recommended nor has Laszlo ever supported it. There are numerous reasons why you wouldn't want the compiler to be engaged on every application access right now (compiler is too slow and uses too much memory, compilation locks the server) although... for some situations this might be ok.


Having spent some time struggling to get PHP 5.0.2 finally to work with Laszlo 2.2 (see neighbouring thread) I wonder why Pre-Processed Requests works "minimally".

A marriage of Laszlo and PHP is very interesting .. but not if it takes ages to compile.

I have not yet been able to Krank a simple hello.php.lzx application.

bloch
10-24-2004, 08:11 AM
The compiler is too slow. That's the main problem with this idiom for now. But you can use .php and .lzx together and we do.


It's simply better practice to leave the .lzx fixed and have the program make runtime data requests back for session related information.

-Eric

scheidecker
10-24-2004, 11:58 AM
Eric & Everybody,

I pretty much agree that lzx should remain static, however I wonder how one would have php links inside lzx that would change depending on the user. What I mean by that is I have a php application that I would like to integrate with lzx. The php application start through a login in procedure that assigns a session id to each user. This session id has to be passed either byt a hidden html field or through a get string attached to the end of the php like script.php?sessid=3kjbn3495762r524

Now, my biggest challenge here is how to do it.

On the other hand, if I rewrite the whole thing using jsp and servelets (that keep state) I would not have a problem. However, there is not enough time to rewrite in jsp/servlet.

What are your thoughts on this matter?

Thanks.

bloch
10-24-2004, 12:58 PM
You can get the session id into the lzx in a number of ways... via a param to the embed tag... via a cookie (lzx data requests can read response headers... or you can simply embed the session id in some generated xml that the app reads)

Your on your own from here...

-Eric

scheidecker
10-24-2004, 01:43 PM
Eric,

Would you have a code sample on how to do that? I cannot use cookies but I can use anything else that do not write anything to the client to keep state.
In this homework project we are trying to work, cookies are not allowed.

Thanks.