Just an interesting follow up to this. I just encountered really strange
behavior with IIS6 that was very similar to this. (not to mention
extremely frustrating).
I was messing with IIS6 settings, and somehow (I'm still not quite sure
how), when I went to look at a .cfm file, my browser (Chrome in this
case) would try to download it.
I spent a considerable amount of time screwing even more with IIS
settings trying to figure out what the heck I did to make it do that,
and every freaking time I hit the .cfm file it would show up as a download.
Today I decided to to take my own advice and use this telnet method, and
I got the proper mime type back (text/html), along with the correct
CFML-processed response. When I hit the same URL with my browser though,
Chrome would try to download it! Grr...
I opened up firefox, and hit the URL, and it worked great. I then
cleared out all of Chrome's cache, and hit a CFM file again, and this
time it came through perfect.
Lesson learned - clear your browser's cache when testing!
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions
Jordan Michaels wrote:
Well, your file is obviously resolving just fine, but it's not being
passed as the proper mime type. Like I said, I tried this same thing on
a fresh install and didn't run into this issue. There's got to be
something else effecting it. Either in how your browser interprets it or
in how Tomcat's web server is delivering it.
You can test to see what MIME type tomcat is delivering the file as by
using Telnet - which is a command-line tool that can be used to emulate
various web protocols.
Please try the following from your local machine:
1) Go to Start -> Run -> type in "cmd" -> hit "Enter"
This should give you a windows command-line window.
2) Type in "telnet localhost 8888"
This tells telnet to connect to your local box on port 8888 - which
Tomcat is listening to. You should get a response similar to the
following (I'm doing this from my Linux desktop, so your results may be
slightly different):
--------------------------
Trying ::1...
Connected to localhost.
Escape character is '^]'.
--------------------------
3) From here, type the following, without the quotes:
"GET /bluedragon/scripts/cfform.js HTTP/1.0"
This tells Telnet to request the cfform.js file using the HTTP 1.0
protocol. You should get a response back from the Tomcat web server -
with most importantly, the HTTP headers. The top of the response will
look something like this:
--------------------------
\HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"7777-1242256504000"
Last-Modified: Wed, 13 May 2009 23:15:04 GMT
Content-Type: text/html
Content-Length: 7777
Date: Thu, 18 Mar 2010 20:16:28 GMT
Connection: close
--------------------------
What does your "Content-Type" value say?
Once you know that, then you can determine if it's a Tomcat issue
(delivering the file as something other then "text/javascript") or a
client issue (something wrong with how your browser is interpreting the
file).
Hope this helps!
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions
Dino Edwards wrote:
I changed the <scriptsrc></scriptsrc> in the
"/opt/openbd/conf/bluedragon.xml" to "/bluedragon/scripts" and even
"$/bluedragon/scripts" and it still doesn't work. The scripts folder
with the "cfform.js" was already located in
"/opt/openbd/tomcat/webapps/ROOt/bluedragon" directory and I even made
all the .js scripts executable with no difference. I changed the
ownership from "root" which they were to "nobody" and "apache" with no
difference. There is a web.xml file under "ROOT/WEB-INF" but it didn't
have an entry for mime type for .js files or any other mime entry for
any other type of files anyways. I did verify that there is an entry
in "/opt/openbd/tomcat/conf/web.xml" for js files and it looks like this:
<extension>js</extension>
<mime-type>text/javascript</mime-type>
</mime-mapping>
I'm still in the same situation. An interesting thing is that IE tries
to download the file, while Firefox displays a bunch of text when I
try to browse to the cfform.js file.
On Wed, Mar 17, 2010 at 2:02 PM, Jordan Michaels <[email protected]
<mailto:[email protected]>> wrote:
Hi Dino,
First, thanks to Matt for bringing this to my attention.
I was able to do some testing on this and I can confirm that the
current version of the installers doesn't include the scripts
directory. Thank you Dino for letting me know and helping to make
the installers better!
However, the workaround for it is pretty easy. You don't have to
change any settings in the administrator, just make sure your
bluedragon.xml file says
"<scriptsrc>/bluedragon/scripts</scriptsrc>", in the "system" subset.
>From there, you can do what you've done already and grab the
scripts folder from the Jetty distribution, and put it in
/opt/openbd/tomcat/webapps/ROOT/bluedragon/ directory.
I tested the example code you provided and didn't get any errors
once I added the script directory here.
The problem with your browser wanting to download the js file sounds
like a mime type problem. In your Tomcat web.xml file, close to the
bottom, make sure there's a mime type entry for .js that indicates
text/javascript. Also check to make sure there's no web.xml file in
the ROOT/WEB-INF/web.xml file that may be overriding the default
mime type.
The major mistake here was me forgetting to include the scripts
folder into the installers. This will be corrected in the next
release. I've been working very hard trying to get IIS6 to cooperate
with me the past few days so that it can be supported by the
installer. It's coming along nicely though and I expect to have it
all ready by the time the next release is due in April.
Hope this helps!
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions
Dino Edwards wrote:
I cannot hit cfform.js when I try to get to it using the URL
below. I had to create the "/bluedragon/scripts/" directory and
manually put the scripts in there cause it didn't exist
originally. The only way I can hit the cfform.js script is if I
create a "/scripts" directory under:
"/opt/openbd/tomcat/webapps/ROOT/bluedragon"
So it looks like:
"/opt/openbd/tomcat/webapps/ROOT/bluedragon/scripts"
and then I can browse to
"http://host:8888/bluedragon/scripts/cfform.js" and it prompts
me to download "cfform.js". I guess another point of interest is
the fact that tomcast runs under port "8888" vs. "8080" like you
mentioned. This was the default using the installation.
On Wed, Mar 17, 2010 at 10:08 AM, Matthew Woodward
<[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>>
wrote:
On Wed, Mar 17, 2010 at 3:25 AM, Dino Edwards
<[email protected]
<mailto:[email protected]>
<mailto:[email protected]
<mailto:[email protected]>>> wrote:
I'm still having the "cfform_submit_status" is undefined
error
and I have not been able to get past it. Here's the code
for the
form field I'm trying to validate below, just in case it
needs
to be a little different for openbd:
What happens when you try to hit cfform.js in a browser? In
the WAR
install running on Tomcat for example I can go to:
http://localhost:8080/openbd/bluedragon/scripts/cfform.js
If you can't hit the equivalent URL for your configuration
that
would mean OpenBD can't see cfform.js.
The only other thing is do you have any other javascript
involved on
the page? Sometimes conflicts can arise if you have additional
javascript in the mix.
-- Matthew Woodward
[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>
http://blog.mattwoodward.com
identi.ca/Twitter <http://identi.ca/Twitter>
<http://identi.ca/Twitter>: @mpwoodward
Please do not send me proprietary file formats such as Word,
PowerPoint, etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html
-- Open BlueDragon Public Mailing List
http://www.openbluedragon.org/
http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!
-- Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!
-- Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!
To unsubscribe from this group, send email to openbd+unsubscribegooglegroups.com or reply
to this email with the words "REMOVE ME" as the subject.