Saturday, June 16, 2007

Compression in IIS6.0

So today, I decided to begin messing around with a couple of things of which I will post about. This first one was compression in IIS 6.0, I know apache has built in modules for this, even some more that I will reference in the next entries, but I don't use apache, I use IIS, so here goes.
As I was searching for any reference to this subject I found an excellent one from Scott Forsyth, labeled "IIS Compression in IIS6.0". Anyway, since it is his teachings and not mine, I will not go into detail on how to do this process, I believe he deserves the credit and your attention so just click on the link to go to his blog entry. 
Just to prove that his walk thru works and that you can see for yourself, below are two images using Firebug. The page is a pretty simple page that I was using to test SES (Search Engine Safe) URL's (My next entry). You will notice the first one was originally 7k and the compressed version came thru at 2k. I know it is a small example but with a compression of over 60%, I can only assume great results are to come to all files of all sizes.
One more note, his final 2 lines show you how to enable and disable this feature to a specific site via the command line. It is instant no restart of the webserver required, the test I show below was done one after the other with that simple command. So in case it is giving you problems, you have the assurance that you can remove it on the fly.
NO COMPRESSION EXAMPLE
COMPRESSION EXAMPLE
Until the next time ....

Friday, June 15, 2007

Installing CF8 on Existing CF7 Multi Server Setup and use JRE 1.5

So tonight, I found myself searching for a little help on this subject and came up with one blog referencing a side-by-side CF7/CF8 stand alone installs using Apache. It seems pretty easy but the problem I faced was that I am using IIS and I have my CF setup as Multi-Server JRun configuration. If the first scenario I gave seems like what you need to do, then you can click here to go to that blog entry, if not read on. So let's start this little mission. First, I started by creating a new instance on my JRun server. I've read instructions from Adobe (Macromedia actually back then) on how to do this, but instead of trying to find that article I will guide you thru my steps.
STEP 1: CREATE NEW SERVER INSTANCE IN JRUN
  1. Login to JRun Administrator
  2. Click on "Create New Server"
  3. When the window pops-up enter your JRun Server Name. I named mine cfusion8.
  4. After you type your server name and either click on tab or click on "JRun Server Directory", you will notice it pre-populate. Leave this as is, as it will create your named directory in your servers folder inside your JRun folder.
  5. Click on create server and you will get a confirmation page with all your ports for your server. At this point there is no need to do anything else and click on Finish.
DO NOT START THE SERVER YET!

Ok, so now that we created our server, navigate to your JRun Servers folder (i.e. C:\Jrun\Servers\). Inside that folder you will notice a new folder named cfusion8. Go into the folder and delete the default-ear folder. You will still have one folder inside named SERVER-INF, leave that folder alone. For now, this completes creating the server where your CF8 installation will go, now we have to go create the EAR file from the CF8 install. The steps are as follows;

STEP 2: INSTALL CF8 AS EAR

  1. Download CF8 Beta from Adobe Labs
  2. Run Installation and Select Deployment option (3rd option) and select EAR file.
  3. Some important notes on your installation. The first option is where the installer will place your ear file (so remember the location) and when selecting your context root, the default in the installer is cfusion, but if you want it at the root specify it when it asks you "\". Basically make sure to read everything as you are going step by step.
  4. Once the installer finishes navigate to the folder where the ear file is. You should see a file named cfusion.ear. You will need to extract this file, there are some instructions on how to in the included read me file.
  5. When you extract the file make sure to change the name of the extracted folder to cfusion-ear. Then go into the folder and extract the cfusion.war file. The same applies here, when the extraction is complete make sure the name of the folder is cfusion-war.
  6. Navigate into the WEB-INF folder, open the application.xml file and change the web-uri from cfusion.war to cfusion-war.
  7. Navigate out and copy the entire cfusion-ear folder to the %JRun%\Server\cfusion8\ folder. (The folder we deleted the default-ear file from)

At this point you can go to your JRun Admin and start the server. Once you start the server, connect to it using the specified HTTP port for the server in the JRun settings (i.e. http://locahost:8301/CFIDE/administrator). This should get you to the initial CF page that finishes the installation. Once the installation is complete, login to your CF8 server.

OK, so at this point I was excited but then I navigated to my Server Settings and noticed the Java Version in use was 1.4.2_09 (pictured below), same as my CF7 install. This happened because my CF8 install was using the same JVM as my CF7 install and the 1.4 JRE in JRun. So there are a couple of things I had to do here, but before that. I am assuming that you are using IIS and using more than one website on your server. So open up the"Web Server Configuration Tool" (pictured below) and select the IIS sites that will use your new CF8 install and leave the CF7 sites alone. Once new JRE is selected I kept getting an error when trying to config, but there is a work around for it as well, but for config your sites at this point.

SERVER SETTINGS
Web Server Configuration Tool
At this point I needed to figure out how to use a different JVM and how to install the new 1.5 JRE on my server. So first install JRE by going to sun and selecting the JDK 5.0 Update 12 version (click here to go to download page). You will need this version as the JRE includes the server folder that is required, the SE version only has the client folder. I am sorry if this makes no sense but trust me I went thru it already. Now the next steps I used some information from another blog entry to create what I needed. I will summarize my steps below but the blog entry I referenced was Mark Kruger's "Coldfusion Muse - Including Custom JVM Settings "
  1. Create a new JVM file - I called mine jvm.config_five
  2. Inside the JVM file change the java.home value to the folder where the new jre is installed (i.e. java.home=C:\\Program Files\\Java\\jre1.5.0_12\\jre)
  3. Create a new windows service using the command line jrunsvc utility in the JRun/bin/ folder - use the following command.
  4. C:\JRun4\bin>jrunsvc -install cfusion "Adobe JRUN CFusion Server" "Adobe JRUN CFusion Server" -config jvm.config_five
At this point go back to your JRun Admin and STOP THE CFUSION8 SERVER. Once it has stopped, start your server via the windows service. If you get an error go look in the jrun4/logs directory for the cfusion8-out.log and the cfusion8-err.log. If everything goes perfect you should be able to login into your CF8 admin and see the new JRE version referenced (pictured below). At the same time you can log into your CF7 server and notice it is still running the 1.4 version as it is using the default JVM.
CF8 WITH JRE 1.5
Now, some final notes. In order for your CF8 install to use the 1.5 JRE, you must start the server via the windows services. Starting your server via the JRun Admin will make it use the default JVM and will load using the 1.4 JRE. If you need to work with the "Web Server Config Tool" to add more sites to your CF8 install, then this is something you want to do. For some reason when I attempted to work with the tool while the CF8 instance was using the 1.5 JRE I would get an mBean error. Honestly, I do not know what it means.
I did a simple cfdump on the website I configured for CF8 just to test and it worked showing version 8.  I hope this helps who ever reads this post, I know I am not great at explaining and that may be the reason I don't post much, but I will definitely try to make this good practice.
Now that I have my beta install on my dev server I will begin playing around and post any bugs I may run into with this config and maybe some CF8 posts of my own.  I am also working on Flash a lot lately and trying to get my hands around Flex 2 and well now Flex 3. So you may notice different entry types in this blog, but as it states, this is a Chronicle of a Developer.

Until next time .....

Thursday, January 25, 2007

Remove that wretched "Missing Plug-In" Alert from Firefox

Well, this is probably more of an issue for Mac Users (like me) using the Flip4Mac WMV plugin to play windows media. Apparently, every time I wanted to listen to Sirius online, it worked with no problem but that wretched alert kept popping up.

So what did I do? I went to mozilla.com and went to support and found a simple and great solution I did not know about. This may be no news to some but for those like me check out the next link.

Disable Plug-In Article

Basically, you type about:config in your address bar and a whole bunch of configuration options pop up that you can set. Look for one called plugin.default_plugin_disabled and click on it to set it to false. That is it, restart firefox and voila! Wretched alert is gone! Remember though, if you do this you will not get that alert for any plug-in, but what the hell, you should know what you are opening up anyway.

Hope this helps someone. Firefox Rules, Safari is Great, IE needs an execution.

Thursday, November 02, 2006

MAX 2006 Flashback

Well, everyone in the world has blogged about MAX 2006 and as you all know it was good. I was excited to see the Blue Man Group open up the Max and hearing about all the new and upcoming things that Adobe is bringing to the table. I also want to note, that it goes to show that Adobe was not shy with spending money for this convention. Except for the last day, when I felt like I was getting kicked out - the food died down to a sandwich in a box and after the last class, they all left like a one night stand.

On the classes, I sure wish I would've done what I did the last day. Even though it was great hearing and seeing about what's to come with ColdFusion, it just felt like hour long commercials. On the last day I decided to go to the character animation class presented by Chris Georgenes from Mud Bubble. This was by far the GREATEST class/presentation I went to. I loved how he bashed on powerpoint slides and got down to really showing you tips and getting to the point that the class name portrayed. Most classes were labeled one thing and the speaker never got to the point. For example, one was cue points in flash video and how to handle them with actionscript, etc. The speaker spent 80% of the class on other things except the cue points. I don't mean to bash, but I think some presentations should have been name better and I know a lot more people feel how I felt. Especially after witnessing the verbal beating a CF .NET presenter got in the Q and A portion of the presentation.

This was a great experience overall and there was as many ups as downs. Did you know that Adobe gives free soda and candy to their developers? Freaking great. After every presentation it showed as there was plenty to pick from while walking from presentation to presentation (Sodas, Candy, Chips, Ice Cream .... on and on and on). I wonder if Adobe has a gym at their facilities as well.

I am not a great writer and I am going to try to start blogging more as I want to involve myself more in the community. I will definitely start writing more about Flex 2 as I learn more and more. I did take one of the pre-conference classes on Flex and it was great. So, no promises but I will try to blog more from now on. I also want to bring this knowledge to my ColdFusion User Group (South Florida). I am always scared to do a presentation and it is probably since I only did one on certification. Signing out for now ....

JC

Monday, October 23, 2006

MAX 2006 DAY ONE

I am at max 2006!

Let me start by saying (typing) that the flight was delightful, Delta/Song is my new favorite airline. It felt as if I was a kid since the existence of nice flight attendace was there. Anyway, getting to the Venetian was very nice as well, the weather is great here. The only complain I have so far is that, with the amount of money I am paying here the gym costs an additional $35/day to attend. I do not see this as fair since I pay only $100/yr for my gym, so I will be running outside in the mornings.

Right now I am in my first pre-conference class "Building Flex Apps". I am pretty exited to get this animal down. Even though the class is a bit slow right now I have picked up some new knowledge and am looking forward to more as the class continues. Do not take this as a bad comment on the class, the teacher is great and I have to understand that everyone learns at their own speed.

Signing out for now from the MAX!

JC