View Full Version : Install instructions for JRun (CFMX) ??
marcovth
04-01-2004, 08:53 AM
Can some one give me some instructions on how to
install laszlo core (latest version) with Jrun
(Coldfusion MX latest version) ??
Thanks in advance.
- Marco.
antun
04-01-2004, 09:07 AM
JRun isn't an officially supported servlet container, but the LPS has been installed on it in the past. It should be the same as deploying any webapp in JRun. What errors are you seeing?
-Antun
marcovth
04-02-2004, 05:55 AM
Perhaps some one in your team can install windows
CFMX 6.1 option 3 (CFMX server on top of Jrun).
After install: http://localhost:8000 <== Jrun admin.
Create a new Jrun server called laszlo.
(Rename web.xml to webBkUp.xml in the laszlo-core.)
Copy the laszlo-core to:
...\Jrun4\servers\laszlo\default-ear\default-war\
Edit the web.xml in:
...\Jrun4\servers\laszlo\default-ear\default-war\WEB-INF
-------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>JRun Default Web Application</display-name>
<description>The default web application for JRun</description>
<error-page>
<error-code>404</error-code>
<location>/errorPages/404.jsp</location>
</error-page>
<display-name>LPS</display-name>
<description/>
<servlet>
<servlet-name>LPS</servlet-name>
<servlet-class>com.laszlosystems.servlets.LZServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LZViewer</servlet-name>
<servlet-class>com.laszlosystems.servlets.LZViewer</servlet-class>
</servlet>
<servlet>
<servlet-name>AuthenticationServlet</servlet-name>
<servlet-class>AuthenticationServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LPS</servlet-name>
<url-pattern>*.lzx</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LPS</servlet-name>
<url-pattern>*.lzo</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LZViewer</servlet-name>
<url-pattern>/LZViewer</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AuthenticationServlet</servlet-name>
<url-pattern>/AuthenticationServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
-------------------------------------------------------
Start the laszlo Jrun server (port 8100).
http://localhost:8100/index.jsp and
http://localhost:8100/index.html work fine.
http://localhost:8100/examples/hello.jsp works fine, but
http://localhost:8100/examples/hello.lzx and any other
lzx page give "Page cannot be displayed" error.
ColdFusion MX is a major and popular web application
server, with programmers used to programming with tags.
I expect and hope that your team will like to
make sure that laszlo will run with CFMX as well.
If the Jrun laszlo server works fine, you can set up
laszlo in the CFMX Jrun server, so you need to run
only one Jrun server.
Thanks in advance for the service and advice.
- Marco.
marcovth
04-02-2004, 06:28 AM
Here is some code I made the get dynamic xml-data with Coldfusion:
- xml.com only allows requests from the server it is located on.
- It calls an include file (incl-qxml.cfm) were all the queries are located.
- If YOURQUERYNAME (stored in URLparam 'query' and sent by your lzx script)
is found your query in incl-qxml.cfm will be executed, and xml.cfm will format
it into a xml file.
- test.lzx:
var p=new LzParam(); p.addValue("query","YOURQUERYNAME-1",true);
- incl-qxml.cfm:
<cfif trim(query) IS "YOURQUERYNAME-1">
<cfquery name="query" ect ... >
SELECT .....
</cfquery>
</cfif>
- The xml output will also give you the column names and the record count.
##################################################
####### xml.cfm #################################
##################################################
<cfif cgi.REMOTE_ADDR IS "YOUR.SERVER.DOMAIN.NAME.COM">
<cfparam name="query" type="string" default="">
<cfif NOT trim(query) IS "">
<cfset qName=query>
<cftry>
<cfinclude template="incl-qxml.cfm"><cfset cList=query.columnList>
<cfif query.RecordCount GT 0>
<cfcontent type="text/xml"><?xml version="1.0" ?>
<cfoutput><#qName#>#Chr(10)#</cfoutput>
<cfoutput query="query">#Chr(09)#<record id="#CurrentRow#" <cfloop list="#cList#" DELIMITERS="," index="ii"> #ii#="#evaluate(ii)#"</cfloop>#Chr(10)#/></cfoutput>
<cfoutput><ColumnList>#cList#</ColumnList></cfoutput>
<cfoutput><RecordCount>#query.RecordCount#</RecordCount></cfoutput>
<cfoutput></#qName#></cfoutput>
<cfelse>
<cfcontent type="text/xml"><?xml version="1.0" ?>
<cfoutput><#qName# <cfloop list="#cList#" DELIMITERS="," index="ii">#ii#="" </cfloop>/>#Chr(10)#</cfoutput>
</cfif>
<cfcatch></cfcatch>
</cftry>
</cfif>
<cfelse>Sorry, this page can only be requested by our server.</cfif>
##################################################
####### incl-qxml.cfm ############################
##################################################
<cfif trim(query) IS "YOURQUERYNAME-1">
<cfquery name="query" ect ... >
SELECT .....
</cfquery>
</cfif>
<cfif trim(query) IS "YOURQUERYNAME-2">
<cfquery name="query" ect ... >
SELECT .....
</cfquery>
</cfif>
##################################################
####### test.lzx #################################
##################################################
<canvas height="200" width="800" bgcolor="#D4D0C8">
<dataset name="query" autorequest="true"
type="http" src="http://YOUR.SERVER.DOMAIN.NAME.COM/xml.cfm"/>
<inputtext width="90" name="employeeID"></inputtext>
<button> submit
<method event="onclick">
var d=canvas.datasets.query;
var p=new LzParam();
p.addValue("query","YOURQUERYNAME-1",true);
p.addValue("employerID",employeeID.getText(),true);
d.setQueryString(p); d.doRequest();
</method>
</button>
<simplelayout axis="y"/>
<view name="list" datapath="query:/YOURQUERYNAME-01/record">
<simplelayout axis="x"/>
<text datapath="@EMPLOYEEID"/>
<text datapath="@EMPLOYEE"/>
etc ...
</view>
</canvas>
antun
04-02-2004, 07:42 AM
If the Jrun laszlo server works fine, you can set up laszlo in the CFMX Jrun server, so you need to run only one Jrun server.
Right. However this jogged my memory. Someone tried to install LPS on top of the JRun that came with ColdFusion MX before, and discovered that the version of JRun that shipped with Colfusion MX is not a fully-fledged edition of JRun at all:
http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=218
If I have some time I'll give the install a try and let you know how it goes.
Take care,
Antun
marcovth
04-02-2004, 07:55 AM
The thread you linked to is from May 2003.
The current CFMX 6.1 update comes with a full
version of Jrun, if I understand well.
I will ask Macromedia.
Thanks.
- Marco.
antun
04-02-2004, 11:57 AM
Hi Marco
Well, we spent a fair amount of time trying to set up LPS 2.1 on the JRun that comes with CFMX, and had no luck.
In our case, we got the LPS webapp to display HTML pages, but whenever a .lzx file was clicked, no response would get sent from the server.
I think the main reason we didn't have any luck was because we're not familiar with setting up webapps on JRun.
Personally I haven't come across a servlet container that deals with the notion of "servers", and we tried to set up Laszlo both as a server in JRun and as a Webapp in the default server. I believe you tried the latter.
Maybe you can shed some light on how webapps are normally deployed in JRun?
Like I said before, although it's not an officially supported servlet container, it should work and we have had the LPS running in a previous version of JRun.
I have filed a request that JRun 4 be a supported servlet container.
Take care,
Antun
marcovth
04-05-2004, 05:33 AM
I have beta-tested Flex for a couple of weeks until I
figured out what the cost of a license would be. ($12,000US)
Searching for an alternative, I found Laszlo :)
But without a problem, I was able to set up Flex on top
of JRun by starting a new JRun server (instance) and
copy-&-paste flex to the right directory.
I did the exact same thing with Laszlo.
I will try today to install CFMX with Tomcat and get
rid of JRun.
Is there an easy way (script) to install Tomcat as a
service on windows?
Thanks again.
- Marco.
antun
04-05-2004, 07:47 AM
If you download Tomcat from the Jakarta website (http://jakarta.apache.org/tomcat/) and install Tomcat alone first, the Tomcat installer should give you the option to install Tomcat as a service.
Then you can install LPS DE Core into that instance of Tomcat.
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.