Archive | May, 2008

Indiana Jones 4 and …

… I just got back from watching the latest Indiana Jones movie called “Indiana Jones and the Kingdom of Crystal Skull“. So, what do I think of it?

Well from the beginning on, you are reminded that this is a Indiana Jones movie. The hat sits at the right place, “Indy” looks “as always”. The action is right and it is fun watching the movie. There are some jokes in it, not a lot, but just about enough. I think that Cate Blanchett is the perfect vilain (she looks good in every part of the movie). In the typical Indy manner the movie takes its turns, but…

The last 30 minutes of the movie, are simply put, a total waste of time and a disapointment. Why on earth, does Spielberg need to put in his “Alien freak show” (as he has done with all his last movies) in Indiana Jones? The whole thing that the 13 aliens combine into one and then destroys everything around it and flies back home in his mothership is just a very bad ending for the Indy series.

Comments { 11 }

Performance tips for Tomcat and Open BlueDragon

I get a lot of questions on this blog and a lot more per eMail on how to fine tune Tomcat and get it running together on Apache and other stuff. Since the release of Open BlueDragon, Tomcat is more apparent to a lot of CFML-Developers then ever.

I already posted an entry of how to get Tomcat running “behind” Apache and thus will focus here on the two configurations that helps the most.

Tomcat and memory

The number one issue I am seeing on the net is that a lot of users complain that Tomcat runs out of memory or pages are not being served properly. I have also seen a lot of posts where people are only posting snippets of codes but no real world examples of where to change values and how to (just read the FAQ about memory issues over at the official Tomcat site and you know what I mean). But actually it is so easy…

By default, Tomcat sets its own memory size at around 64MB which by far is not enough for web applications. You can set the “start size”, the “maximum size” and you also need to up the heap space. to find out the proper values for your platform you will need to issue the command “java -X” in the terminal. For MacOS X 10.5.2 these parameters are:

-Xms<size>  set initial Java heap size
-Xmx<size>  set maximum Java heap size
-Xss<size>   set java thread stack size

Once you know your parameters you should allocate about 80% of your available Ram to Tomcat.

Open up your “catalina.sh” file (in the Tomcat installation folder under “conf”) and add the following lines at the top of the file, but just underneath the comment section.

With the above settings I get the following Ram allocations under MacOS X.

Just about enough for any decent web application :-)

Default settings in web.xml

The web.xml is the document that defines default values for ALL Web applications loaded into each instance of Tomcat. As each application is deployed, this file is processed, followed by the “/WEB-INF/web.xml” deployment descriptor from your own applications.

By default, Tomcat sets the “reload” and the “development” parameters to “true”. The tricky thing is that these parameters can not be found anywhere as they are set by the server internally. Thus we need to ADD these two parameters and set them to “false”.

Open your web.xml file (in the Tomcat installation folder under “conf”) and add the two values to the “JSP” servlet container.

After you have done these two fundamental changes you should restart Tomcat. Watch how your applications behave and change the memory settings if needed.

Comments { 0 }

Solutions for Office 2008 SP1 installation problems

Sadly the Service Pack 1 for Office 2008 brings a lot of installation problems. I myself suffered from the “Office Setup Assistant opens when I try to open an Office 2008 application” problem, and was going nuts for hours. But apparently there are more problems to be solved…

Despite the bad news that Office 2008 SP1 received, I do have to say that Office 2008 in general is a very good application and Entourage itself a very good eMail client. Anyhow, over at the Entourage Help Blog we can find solutions for the all the Installation errors so far.

Comments { 33 }

Serve CFML applications under Apache directory with Tomcat

In the comment section, about using Open BlueDragon with Tomcat, one user asked: “How do I get tomcat to serve my cfm pages from under an apache virtual server directory or is that not the right way. In other words how does one set up a virtual server running on port 80 if one has never used tomcat before?” I actually wanted to answer to him directly, but then thought I make it a blog entry on its own, since others might be interested as well.

What will follow is my setup with Apache and Tomcat.

1. Have Tomcat running on port 8080 (default).
2. Deploy the openbluedragon.war file.
3. Copy over the “bluedragon” and “WEB-INF” directories to your application.
4. Edit the server.xml file to add a host, like:

<Host name=”openbd.local”>
<Context path=”" docBase=”ABSOLUTEPATHTOYOURAPPLICATION”/>
</Host>

The docBase path can be the application you have already running on your website.

5. Restart Tomcat.

Now what you have to do is to forward any requests to openbd.local from Apache to Tomcat. Tomcat then serves the pages according to the docBase path. In Apache I have it setup like:

<VirtualHost *:80>
ServerName openbd.local
ProxyPass / http://openbd.local:8080/
ProxyPassreverse / http://openbd.local:8080/
HostnameLookups Off
</VirtualHost>

This works perfectly.

The only caveat with this is that each of my applications need a “WEB-INF” and a “bluedragon” folder. Making updating a “pain”. But apparently, this is the best way to serve pages from a J2EE server. Each application has its configuration and you can only enable what you need for that particular application.

Comments { 1 }