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 [...]
In: Java · Tagged with: apache, javaserver faces, jsf, maven, myfaces, tomcat 5.5.x
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 [...]
In: Beginners, Development, Java · Tagged with: concatenation, html, Java, optimisation, performance, speed, string, stringbuffer, stringbuilder
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 [...]
In: Development, Java, PERL, PHP, web · Tagged with: mp3 doc pdf xls content-disposition content-type http
