[Laszlo-dev] Run, JRun, Run!

Oliver Steele steele at laszlosystems.com
Fri Jan 28 16:12:17 PST 2005


Thanks so much, this is really really great!  We have had several  
inquiries from people who wanted to use Laszlo with JRun, and we have  
been too stupid (speaking for myself) or otherwise unable to figure it  
out.

I added a link from the OpenLaszlo wiki to your blog entry, and I will  
get back to you first thing Monday about getting your fixes into the  
source base.

Best,
Oliver

On Jan 28, 2005, at 6:28 PM, Doug Hughes wrote:

> Absolutely.  I just blogged about this too.
>
> First thing tomorrow.
>
> Doug
>
> -----Original Message-----
> From: laszlo-dev-bounces at openlaszlo.org
> [mailto:laszlo-dev-bounces at openlaszlo.org] On Behalf Of Lyndon Wong
> Sent: Friday, January 28, 2005 6:12 PM
> To: OpenLaszlo platform development and bug reporting
> Subject: Re: [Laszlo-dev] Run, JRun, Run!
>
> Hi Doug,
>
> This would make a valuable contribution to the OpenLaszlo Wiki. I  
> added a
> User FAQ link and place-holder page referencing your mailing list post  
> at:
>
> http://www.openlaszlo.org/wiki/index.php?title=User_FAQ
> http://www.openlaszlo.org/wiki/index.php?title=LaszloWithJrun
>
> Would you feel OK with publishing your results on that Wiki page, and
> letting the community contribute corrections and additions as  
> appropriate?
> If so, I can help set it up if you're not familiar with MediaWiki  
> markup.
>
> Best,
>
> Lyndon
>
> On 1/27/05 7:12 PM, "Doug Hughes" <dhughes at alagad.com> wrote:
>
>>
>> Ok, as promised, here are step by step instructions on deploying
>> Laszlo
>> (Unmodified) onto JRun.
>>
>> Can you guys please take a look at the hooking into IIS portion at the
>> bottom and the mappings I have to create and where I need to put
>> files?  It seems like Laszlo isn't translating the path
>> http://blah.com/myfile.lzx to it's actual location on disk and is
>> therefore unable to parse it.  My work around works, but it's ugly at
> best.
>>
>> Also, there are some errors in the /lps/utils/viewer/viewer.jsp file.
>> I'll send a fix later.  I plan to blog about this on my site (which
>> gets a lot of Macromedia coverage) some time tomorrow.
>> (http://www.doughughes.net).  Please let me know if you have any  
>> feedback!
>>
>> Doug Hughes
>> dhughes at alagad.com
>>
>> Instructions are as follows:
>>
>> 1)      Download / Install JRun
>>
>> 2)      Download and extract the Laszlo 3 beta 1 core files. I did to
>> F:\downloads\Laszlo Core 3b1\.  The extraction created a tree of
>> folders under lps-3.0b1-core.  One of these folders is \lps-3.0b1.
>>
>> 3)      Create a new JRun server named "Laszlo".  Don't start it.
>>
>> 4)      Open the folder C:\JRun4\servers\Laszlo and create a new  
>> folder
> called
>> "Laszlo-war" under it
>>
>> 5)      Delete the default-ear folder.
>>
>> 6)      Copy the contents of  \lps-3.0b1 to
> C:\JRun4\servers\Laszlo\Laszlo-war
>>
>> 7)      Under \Laszlo-war, open the WEB-INF folder and create a new  
>> file
> named
>> jrun-web.xml.  Put the following content into this file and save it:
>>
>> <!DOCTYPE jrun-web-app PUBLIC "-//Macromedia, Inc.//DTD jrun-web  
>> 1.0//EN"
>>   "http://www.macromedia.com/dtd/jrun-web.dtd">
>> <jrun-web-app>
>>   <load-system-classes-first>false</load-system-classes-first>
>> </jrun-web-app>
>>
>> 8)      Find and copy the file xerces.jar into
>> C:\JRun4\servers\Laszlo\Laszlo-war\lib.  I found the one I¹m using in
>> the source code distribution.  I understand that Laszlo can be rather
>> picky about this.  I suggest getting the one from the source download.
>>
>> 9)      Open C:\JRun4\bin
>>
>> 10)  Copy jvm.config to jvm.config_Laszlo
>>
>> 11)  Edit jvm.config_Laszlo in notepad.  If you¹re using ColdFusion on
>> JRun delete any reference to any ColdFusion or cfusion (and its  
>> related
> settings).
>> For me this was:
>> a.       Remove:
>> -Xbootclasspath/a:"{application.home}/servers/cfusion/cfusion-ear/cfus
>> ion-war/ WEB-INF/cfusion/lib/webchartsJava2D.jar"
>> b.      Remote everything after the ³=² on the java.library.path=  
>> line.
>> c.       Three paths with cfusion in them from the class path.
>> d.      You may have others.  Get rid of them!
>>
>> 12)  Make these additional changes to the jvm.config_Laszlo file:
>> a.       Add {application.home}/servers/Laszlo/Laszlo-war/WEB-INF/lib  
>> as
> the
>> FIRST entry on the java.class.path line of jvm.config_Laszlo.
>> b.      Then, move the {application.home}/lib from the end of the  
>> line to
> the
>> second element.
>> c.       My jvm.config_Laszlo ended up looking like as follows.  Note,
> that
>> some lines are shown wrapping.  These are not line breaks.  Also note,
>> don¹t just copy and paste this.  Use this as a reference for your
>> file.  I broke another server by just copying this.  Just make the
>> changes suggested above and use this as a reference.
>>
>> # VM configuration
>> #
>> # Where to find JVM, if {java.home}/jre exists then that JVM is used #
>> if not then it must be the path to the JRE itself
>> java.home=C:/JRun4/jre # # If no java.home is specified a VM is
>> located by looking in these places in this # order:
>> #
>> #  1) bin directory for java.dll (windows) or lib/<ARCH>/libjava.so
>> (unix) #  2) ../jre #  3) registry (windows only) #  4) JAVA_HOME env
>> var plus jre (ie $JAVA_HOME/jre) #
>>
>> # Arguments to VM
>> java.args=-server -Xmx512m -Dsun.io.useCanonCaches=false
>> -XX:MaxPermSize=128m -XX:+UseParallelGC
>>
>> #
>> # commas will be converted to platform specific separator and the
>> result will be passed # as -Djava.ext.dirs= to the VM
>> java.ext.dirs={jre.home}/lib/ext
>>
>> #
>> # where to find shared libraries
>> java.library.path=
>> system.path.first=false
>>
>> #
>> # set the current working directory - useful for Windows to control #
>> the default search path used when loading DLLs since it comes # before
>> system directory, windows directory and PATH
>> java.user.dir={application.home}/../lib
>>
>> # JVM classpath
>> java.class.path={application.home}/servers/Laszlo/Laszlo-war/WEB-INF/l
>> ib,{appl
>>
> ication.home}/lib,{application.home}/servers/lib,{application.home}/ 
> servers/
> li>
> b
>>
>> 13)  To use the config file you just created, you will need to create
>> a window service and tell it to use the config file.  To do this, open
>> a command prompt and go to c:\jrun4\bin.  Type:
>>
>> jrunsvc -install Laszlo "Laszlo" "Laszlo" -config jvm.config_Laszlo
>>
>> This will install the Laszlo server as a service.  When the service
>> starts up it will use the config file we just created.
>>
>> 14)  Start the Laszlo service from the services control panel.  Note,
>> you actually need to not start Laszlo from the JRun interface.  For it
>> to work correctly you must use the services control panel. (I think.)
>>
>> 15)  Navigate to http://localhost:8101/Laszlo-war/index.html  (note,
>> the port might differ based on the settings you assigned (or
>> defaulted) when you created the server).
>>
>> Hooking into IIS.
>>
>> To hook Laslo into IIS via JRun follow these instructions:
>>
>> 1)      Run the Web Server Configuration Tool.  This will open a small
> window
>> listing all your current configurations.
>>
>> 2)      Click AddŠ
>>
>> 3)      In the new window select the JRun server to connect to.  In  
>> this
> case
>> ³Laszlo².
>>
>> 4)      Select the IIS website to connect to from the drop down list.
> Note: I
>> was able to get both CF and Laszlo to run via different JRun instances
>> on the same IIS entry.
>>
>> 5)      Do not check Configure web server for ColdFusion MX  
>> applications.
>>
>> 6)      Click advanced.
>>
>> 7)      Click the Use Application Mappings radio button.  Type in  
>> .lzx (to
> the
>> right of the add button) and click add.
>>
>> 8)      Click ok.
>>
>> 9)      Click ok again.  You¹ve now configured IIS to send requests  
>> for
> lzx
>> files to JRun and Laszlo for processing.  There¹s a gotcha, though.
>> Laszlo doesn¹t quite work correctly with IIS.
>>
>> 10)  To correctly complete the configuration open the IIS admin and
>> find the site you just connected JRun to.  Add a virtual directory in
>> the root of the site named Laszlo-war.  Map this to
> C:\JRun\servers\Laszlo\Laszlo-war.
>>
>> 11)  Place any .lzx files you need into the
>> C:\JRun\servers\Laszlo\Laszlo-war directory.  You can now access them
>> via http://yourservername.com/Laszlo-war/yourfile.lzx and all will  
>> work!
> Woo hoo!
>>
>> I will see what I can find out about how .lzx files are output so they
>> can be placed right into your webroot.
>>
>>
>>
>>
>>
>> ?
>> _______________________________________________
>> Laszlo-dev mailing list
>> Laszlo-dev at openlaszlo.org
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
>
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
>
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev




More information about the Laszlo-dev mailing list