The DOWNLOAD_URL pointing to javashoplm.sun.com/... the ebuild is suggesting isn't working. You are presented with a login box. It seems that they are checking the referer. You need to go to http://java.sun.com/javase/downloads/index.jsp and click on the download button for "Java SE 6 Documentation". For version 1.5* you have to go to http://java.sun.com/javase/downloads/index_jdk5.jsp, click "J2SE 5.0 Documentation" download button.
It works here and for others too, you're the first to report this. We also use this kind of URLs for other Sun's fetch restricted stuff and never had a prob. Did you copy the URL correctl? I managed to get a login box when I ommited the "&TransactionId=noreg" part. Otherwise it works. Even deleted cookies to be sure. Maybe you are using some browser extension for spoofing referers?
(In reply to comment #1) I am so sorry. I looked into this and found the problem: I use xfce-extra/terminal (version 0.2.5.8_rc2). It can open links and copy a link's address. If I use "open link" the part of the java download url gets truncated (at the position of the first ampersand). Using "copy link address" works fine. The gnome terminal doesn't show this behavior. I think it is safe to say that you can close this bug. I'll try to find out what is broken in my installation (a shell script, I presume?). -- mistake on my part.