Feb 10 08
Use the JavaScript console in Firebug and run the following script snippet:
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("HEAD", "the_url",true); // Async HEAD request (relative path to avoid cross-domain restrictions)
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) { // make sure the request is complete
alert(xmlhttp.getAllResponseHeaders()) // display the headers
}
}
xmlhttp.send(null); // send request
Feb 10 06
The article the quote below was taken from a story about the serious issues Toyota seems to have with its jamming accelerators.
Some owners of recalled Toyotas are now saying they are afraid to drive them. “I live only a half mile from the office and I drive there,” said Elaine Byrnes, a Camry owner in Los Angeles. “If I had to go farther, I wouldn’t consider it.”
http://mobile.nytimes.com/article?a=544543&f=19
I lived in California for a year. So, I know what sort of attitude Americans have towards their cars but this was too much – definitely too much.
The story unfolded like this in my mind:
Some owners of recalled Toyotas are now saying they are afraid to drive them.
“Yes, that’s understandable. Toyota really has a problem. But what do you do? You depend on your cars, don’t you.”
“I live only a half mile from the office…”
“Ohh, well, then there’s no problem, is there? You could walk or take the bike.”
I even did the math quickly: an average adult walks about 5km (3.1 miles) in an hour. Hence, a half mile takes you a little over 10 minutes.
“…and I drive there,” said Elaine Byrnes, a Camry owner in Los Angeles.
“Seriously? What a waste!”
“If I had to go farther, I wouldn’t consider it.”
“What? That reasoning makes no sense at all. That most certainly qualifies for being one of the dumbest justifications for someones actions I’ve heard in a long while.”
As much as I love America, stories like this make me wonder if this planet has a future.
Jan 10 29
As I’m a very liberal mind my heart jumped when I came across the following quote today:
“Government big enough to supply everything you need is big enough to take everything you have.”
A quick Internet investigation lead me to a page that claims that the above quote isn’t by Thomas Jefferson but from Gerald Ford.
Jan 10 28
cache-control, pragma, no-cache, expires header, and tons more. I learned a lot from the below referenced articles.
Caching tutorial for web authors: http://www.mnot.net/cache_docs/
jGuru forum question: http://www.jguru.com/faq/view.jsp?EID=377
Jan 10 22
A friend of mine started learning and practicing “nuad boran“, traditional Thai massage, a while ago. In order to get the best possible courses and the most authentic teachers she spent a few weeks in Thailand twice.
I had the pleasure of serving as one of her “practice objects” i.e. she needed human dummies on which she could practice her new techniques. I was immediately fascinated and impressed. It can give you so much more and it feels so much more complete than an ordinary massage.
Meanwhile she opened her own massage business. Check her out: http://www.mynuad.ch/
Jan 10 18
This is a follow-up for the Beware of WebSphere admins post just below.
My first immediate conclusion after the described deployment problems was to ban the use of the jsession cookie in future applications. If the application always includes the jsessionid parameter in URLs there’s nothing that can go wrong during deployment in terms of cookie paths.
Contemplating a second longer made it obvious that maybe this wouldn’t be such a wise decision after all. There are number of developers who try to enforce the exact opposite because the jsessionid URL parameter can be considered harmful. I highly recommend reading the following two blog posts that support this thesis:
http://randomcoder.com/articles/jsessionid-considered-harmful
http://boncey.org/2007_1_8_purging_jsessionid
Jan 10 18
A lot can go wrong when you deploy a simple Java EE application in IBM WebSphere – even if the application needs nothing but a Servlet container.
We recently shipped a JEE application to the customer. Although it was packaged in an EAR file, because the customer required it, it needs nothing but what the Servlet specification mandates. The application was tested both at other customer sites and on our internal infrastructure. Some customers use JBoss, others Oracle Weblogic and we use Tomcat internally. This new customer uses IBM WebSphere *sigh* – not our dearest friend, but so what. So we set up a WebSphere test server in-house and successfully deployed the application.
The customer asked us to fill in a several page form to specify all the necessary configuration parameters our application required. For almost all fields we settled for the provided default values because all we basically needed was a JNDI name pointing to a datasource.
Needless to say the application didn’t run out-of-the-box at the customer site.
Given the fact that the application runs fine on all but this customer’s infrastructure neither the customer nor I thought it necessary for us to provide on-site support. The log files we got for analysis indicated that somehow they seemed to have a multi-threading or multi-session problem. For two weeks the customer’s network and WebSphere specialists tried to figure our what was going on. When they were at their wits end, my repeated offer to send one of our engineers over was accepted. When he, too, was stuck a day later I asked him to share his screen remotely and show me request/response headers in HttpFox.
It became apparent immediately why our application constantly created new sessions. The cookie path for the jsessionid cookie was neither ‘/’ nor was it equal to the context root of our application. Hence, with every response our application returned a new jsession cookie, but when the browser sent a new request to the application it didn’t include the session id – because it didn’t find a cookie with a path that matched the application’s context root. Usually you’d notice this immediately because you’d have to authenticate yourself (i.e. log in) constantly with every request. Since the customer uses SSO this was done transparently in the background.
So, what’s this got to do with the WebSphere admin? Well, in the form mentioned above we were asked for the application cookie path. The default value was ‘/’ and therefore we hadn’t changed it. The admin, however, acted on his own authority and changed this to something else.
Dec 09 12
I just invested 30min to find tools/libraries which allow me to use PHP scripts instead of Java on the server when the front end is GWT. There are various potential channels through which GWT and PHP can talk to each other. GWT RPC, ideally native or over JSON/XML would certainly be the most obvious choice.
My Internet search didn’t turn up a whole lot of useful stuff…
http://code.google.com/p/gwtphp/
http://code.google.com/p/gwtamp/
http://code.google.com/p/lacertae/
http://download.boulder.ibm.com/ibmdl/pub/software/dw/xml/x-gwtphp/x-gwtphp-pdf.pdf
http://angel.hurtado.googlepages.com/tutorialgwt2
Nov 09 18
On a new OS X 10.6 Snow Leopard the Huwei E220 USB modem (from Swisscom in my case) didn’t work anymore. The USB dongle mounts and the files on the mounted drive were visible but the Unlimited Connection Manager (UCM) installer contained in the mounted drive crashed always. It’s obviously not compatible with 10.6.
To fix this you need to download the latest version from http://www.swisscom.ch/res/hilfe/downloads/mobile/unlimited/index.htm. It still says on that page that only 10.4 and 10.5 are supported but it works just fine with 10.6, too.