Saturday, October 08, 2005

Looking for programmer heaven

Besides the obvious candidates such as Google, Yahoo or Amazon, where else? Where can I find this kind of information?

Tuesday, October 04, 2005

Max method size breached

I have to admit that I only learnt the existence of the 64KB size cap for a java method last night.

Thanks to someone who managed to write a WTF worthy JSP with a whopping 8000 plus lines.


If you know javac turns enum declaration into a subclass of Enum, and understand what the heck is Enum<E extends Enum<E>>, my hat off to you and please stop reading.

For the rest of us, there is a through explanation of enum.

Saturday, October 01, 2005

What servers Google uses?

Ever wondered what servers Google uses to serve up gmail page?

Server: GFE/1.3

Server: GWS/2.1

GWS must be acronym for Google Web Server. Anybody knows what GFE stands for?

Servlet Forward vs Redirect

To do redirect, server sends back a HTTP response status 302. Upon receiving such response, browser is obligated to request page from the new location, hence redirect happens.

HTTP/1.1 302 Object moved
Location: somewhere/newlocation.jsp

Forward, on the other hand, happens internally on the server, and browser is not aware of it at all.

That explains why we need to encodeURL before redirect but not before forward; why states are kept when forward but not when redirect; why redirect method is on Response object but forward is on RequestDispatcher object.

Technorati Tags: