Personal tools

Running OpenLaszlo

From OpenLaszlo

This page provides instructions on running OpenLaszlo. You should already have completed the steps in Installing OpenLaszlo.

Contents

Running the OpenLaszlo Development Kit

Running the DevKit on Windows

  1. When you installed the OpenLaszlo Devkit, it created an icon on your desktop called OpenLaszlo Server. Double click on the icon to start the server. Your browser will open to Laszlo Explorer: Image:Olexplore.png
  2. Test a simple lzx program by pointing your browser to http://localhost:8080/examples/hello.lzx.
    Image:Hello.png

Running the DevKit on Mac OS X

When you installed the OpenLaszlo Devkit, it was installed (by default) in Applications/OpenLaszlo Server 4.9.0. To start the server:

  1. Run Applications/OpenLaszlo Server 4.9.0/Start OpenLaszlo Server.command.
  2. Make sure Tomcat is running by pointing your browser to http://localhost:8080/. You will see the Tomcat startup screen. If you don't, repeat the steps in Installing OpenLaszlo.
  3. Make sure the DevKit is running by pointing your browser to http://localhost:8080/lps-4.9.0. You will see the OpenLaszlo Quick Index page:
    Image:Qindex.png

  4. Test a simple lzx program by pointing your browser to http://localhost:8080/examples/hello.lzx.
    Image:Hello.png

Running the DevKit on Unix/Linux

To run a Laszlo application once you have successfully installed the Laszlo Development Kit:

  1. Start Tomcat:
    Assuming you have set JAVA_HOME to point to the directory in which Java is installed, enter:
    lps-@VERSIONID@/Server/tomcat-5.0.24/bin/startup.sh
    If there is a problem, the error is reported in the console: make sure there are no other processes (including other copies of Tomcat) running on port 8080.
  2. Run Laszlo's hello.lzx application to verify that servlet is installed correctly and that Tomcat has started correctly. (The first application may take 30 seconds or so to start.)
  3. Your browser should display something like:

Image:Hello.png

  1. If your browser does not display the Hello, Laszlo! greeting, please see Installing OpenLaszlo.

Running the OpenLaszlo Servlet

Note: Use these instructions if you have installed the OpenLaszlo Servlet only. If you have installed the OpenLaszlo Devkit, use these instructions: Running the OpenLaszlo Development Kit.

Running OpenLaszlo applications

To run a OpenLaszlo application once you have successfully installed the Laszlo Servlet:

  1. Consult your servlet container documentation for information about how to deploy Web applications.  Then deploy the lps-@VERSIONID@ web application (directory or war file).
  2. Browse to Laszlo's hello.lzx application to verify that LPS is installed correctly and that Tomcat has started correctly. (The first application may take 30 seconds or so to start.)
  3. Your browser should display something like:

Image:Hello.png

  1. If your browser does not display the Hello, Laszlo! greeting, please see Installing OpenLaszlo.
  2. Now, point your browser to the Quick Index page http://localhost:8080/lps-4.9.0 for links to documentation, tutorials, examples, samples and more. Note: if you are running a different release than lps-4.0.9, you should point to the release you installed.

Running your own Laszlo applications

To run a Laszlo application that you have created or modified, you should create your own Laszlo-enabled Web application inside your servlet container:

  1. Create a new directory for your application
  2. In this new directory, create a subdirectory called WEB-INF.
  3. Copy the lib and lps directories and web.xml file from the LPS web application directory into your web application. These files can be found at
yourInstallationDir\lps-@VERSIONID@\WEB-INF     (Windows)
yourInstallationDir/lps/lps-@VERSIONID@/WEB-INF (Linux, OS-X)
Copy them into your application's WEB-INF directory.  If your application already has a web.xml file, you will need to merge the contents of the lps-@VERSIONID@ web.xml with your web.xml.

WARNING: Make sure you duplicate the precise directory structure of the WEB-INF directory when you place these files and directories into your newly-created directory.

  1. Put the .lzx files and art assets that make up your application inside the new directory you created, or put them into a subdirectory you create inside of it.
  2. Consult your servlet container documentation for information about how to deploy this Web application into the container. For Tomcat, you can simply copy this directory into
      tomcatInstallationDirectory\webapps\your-application-dir (Windows)
      tomcatInstallationDirectory/webapps/your-application-dir (Linux, OS-X)