Archive for the ‘Java’ Category

Running Apache MyFaces on Tomcat 5.5.x and below

I’ve recently been looking at JavaServer Faces (specifically Apache’s MyFaces), playing about on my home Tomcat 5.5.27 installation, using Maven2 to do my dependency management, builds etc… …largely unsuccessfully. I just could not get the darned example app to start, with exceptions along the lines of: 20-Apr-2009 22:27:04 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized [...]

Posted on April 20, 2009 at 11:14 pm by Paul Brabban · Permalink · 2 Comments
In: Java · Tagged with: , , , , ,

Faster Java – Strings

If you’re building a long String in Java, don’t stick String objects together using ‘+’, for example: String str = “Hello”; str = str + world; str = str + “!”; Why not? It’s really slow when you do it a lot! What should you do instead? Use the append(String) method in StringBuffer (Java 1.4.2 [...]

Posted on January 29, 2009 at 7:20 pm by Paul Brabban · Permalink · One Comment
In: Beginners, Development, Java · Tagged with: , , , , , , , ,

How do I send files to the Browser?

So you’ve coded up your new webapp. It does some cool stuff and then produces files in a binary format (like .pdf, .doc, .mp3) and you need to deliver these files to the browser. So how do you do that? These are my thoughts and opinions and do not reflect those of anyone else. Read [...]

Posted on October 12, 2008 at 4:05 am by Paul Brabban · Permalink · One Comment
In: Development, Java, PERL, PHP, web · Tagged with: