Solved

Using CFGrid and registering java applets

Posted on 2004-09-21
6
1,489 Views
Last Modified: 2013-12-24
Hello,
I'm experiencing a great deal of frustration and although I've looked through as much printed and online documentation as I can find I cannot figure out the correct thing to do here.

First, on my XP box I have a full StudioMX install and so I am running CFMX developers edition. I want to add a CFGRID to a page on our intranet. I started by using Forta's ActorGrid.cfm from his book and it works fine on my machine. I then wrote my own version for our database and it works fine on my machine.

Next, I moved the file over to the Win2003 in-house web server which is running CFMX 6.1. I am the administrator. I have never run CFGRID on this box before and the code is not running properly. I get a big gray box with a red X at the top.

So, after reading bunches of help that doesn't exactly give me the answers I decided that the answer is to use the Administrator | Extensions | Java Applets page to register the CFGridApplet. I looked in my PC's administrator page and there are NO Java Applets listed so I couldn't figure out why the CFGRID ran fine on my machine but will not run on the web server. So I tried to register the Applet with the following:

Applet Name: CFGridApplet.class
Code: CFGridApplet.class
Code Base: http://SIMPWEBI/inetpub/wwwroot/CFIDE/applets/coldfusion/applets
Archive:
Method:
Height: 500 Width: 500
VSpace: Hspace:
Alight: Left
Not supported message: not supported.

Applet Parameters: left blank

So I hit add and it appears on the Java Applets page but it doesn't do anything for me.

Incidentally, I found a folder buried deep on my C drive under my username/documents and settings with a 41 CF*.class files. I copied these to my web server and pointed the Java Applets page (under code base) to the CFGridApplet.class in this folder.

There is no security turned on with either of these boxes. They are internal and not exposed to the web.  

Thanks in advance, Jerry
0
Comment
Question by:geraldw
  • 3
  • 3
6 Comments
 
LVL 9

Expert Comment

by:shooksm
Comment Utility
Make sure your production server has a copy of CFIDE located at the root of the webserver.  That is where the CLASS and JS files are located for some of the special tags like CFGRID and CFFORM.  View the source of the page and make sure that in the applet tag CFGRID creates that you can physically download (no 404 errors) the file referenced in the code and codebase attributes.
0
 

Author Comment

by:geraldw
Comment Utility
Hi shooksm,

I've looked at the CFIDE folder.  I have CFIDE at the \inetpub\wwwroot on the same level as the website folder.  I looked in the administrator and it is mapped properly.

I've looked over the source code from the page that works correctly (on my XP box) and the one that comes from the internal web server and they look absolutely identical.

I've tried changing the settings for the Applet in the CF Administrator as well as eliminating them altogether since it's not in the Administrator on my XP box.

One thing that might be useful is that if I turn on the Java Console in IE6 I get no errors when I run the page from my XP box but when I run the page from the server I get an error that starts with:

load: class coldfusion.applets.CFGridApplet.class not found.
      etc, etc,

On my XP box the only place that I can find the CFGridApplet.class is buried very deep under C:\documents and settings\Application Data\Sun\.......

all the way down to \jav and I find the files:

cfapplets.jar-52a3ced8-618f8c41.idx  and
cfapplets.jar-52a8ced8-618f8c41.zip

the .idx file has a reference to the CFGridApplet class, etc. and so I tried to put these two files in the same place under the Administrator Documents and Settings on the server. It didn't help.

I tried putting the same files under \CFIDE\ and it didn't help either - even after I tried different mappings.

The only final clue I have is that the browser shows an error message at the bottom when it fails:

Applet coldfusion.applets.CFGridApplet notinited

I'm not a java guy so I'm don't know how to INIT it.  

Sorry, for the long posting.  I hope someone can help.
Thanks, Jerry
0
 
LVL 9

Expert Comment

by:shooksm
Comment Utility
Doesn't look like I made my statement very clear.  You are getting not found errors and class init errors most likely because the class file is not in the proper place.  Take another look at your the APPLET tag that gets generated.  Take the CODEBASE and CODE attribute.  Open up a new browser window and put the following changing what is between the < >:  http://<Production Server URL><CODEBASE><CODE>  

If you get a 404 error, then make sure you create the appropriate folder and make sure the .class file is in there until you no longer get 404 errors.  Then retry your CF page.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:geraldw
Comment Utility
Hi shooksm,
A lot of work for 250 points I know but thanks for getting back to me.

In my source code for BOTH documents (the successful one (my pc) and the failure one (production server) I see:

<OBJECT
  CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  CODEBASE="/CFIDE/classes/cf-j2re-win.cab"
  WIDTH="500"
  HEIGHT="300"
>
    <PARAM NAME="CODE" VALUE="coldfusion.applets.CFGridApplet.class">
    <PARAM NAME="ARCHIVE" VALUE="/CFIDE/classes/cfapplets.jar">
    <PARAM NAME="MAYSCRIPT" VALUE="true">
    <PARAM NAME="AUTOWIDTH" VALUE="no">
    <PARAM NAME="GRIDDATA"

So in my browser it tried:
http://jerrys_xp_box/cfide/classes/cf-j2re-win.cab - succeeds (ask for save or download)
http://simptranet/cfide/classes/cf-j2re-win.cab - fails - page not found

and

http://jerrys_xp_box/cfide/classes/cfapplets.jar - succeeds (ask for save or download)
http://simptranet/cfide/classes/cfapplets.jar - fails - page not found

I checked the \cfide\classes\ folder on both machines and they are identical with the same files, date modified, and file sizes.

My path in the Java Applets page of the administrator now looks like this:

http://SIMPWEBI/cfide/classes/cfapplets.jar-52a8ced8-618f8c41.zip/coldfusion/applets

I can absolutely see CFGridApplet.class as a file in this folder but nothing I do seems to make the application see it.  I checked the permissions on the folder in Windows and I can't think of another darn thing to try.
Thanks, Jerry
0
 
LVL 9

Accepted Solution

by:
shooksm earned 250 total points
Comment Utility
Quick question, on the production server, is the CFIDE folder in C:\CFUSION or in C:\inetpub\wwwroot (change the folders to wherever you have CF and IIS setup at)?
0
 

Author Comment

by:geraldw
Comment Utility
Hello shooksm,

I actually found a solution for this on a Cold Fusion web site but since you stayed with me and your answer is close to the solution I want to give you all the points.

Thanks for your help.  The answer ended up being to use IIS to alias the CFIDE folder from the web site on the production server.  There are 3 sites on the server and this one wasn't linking up with the folder.  So, I just made an alias and that solved the problem without having multiple copies of CFIDE added to the web folder.
Thanks, Jerry
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now