Servlet 2.5, the bad, the ugly, and the pointless

It’s a testament to the power and arrogance of the servlet expert group that they can produce such an abysmally inadequate iteration with such impunity. While the rest of the EE platform (note, it’s EE, or Java EE, not JEE as random turdburglaring wankstain X would have you believe) is busy ensuring that it lives up to the ‘ease of use’ mission, the web tier is still hilariously full of idiotic ideas and pathetic half assed efforts in the general direction of usability.

So what’s actually new? Well, pretty much nothing. All the fuss about annotation support is simply piggybacking off the work of other groups. There isn’t a single annotation that the servlet group has come up with. They just support the bare minimum of injections that the Java EE platform requires, such as @Resource, @PostConstruct, and other random junk from JSR-250 (common annotations). You’d think they’d have at least glanced over the efforts of the EJB group and the web services groups, and come up with things like @Servlet and @Filter, but no such luck.

In an excellent spit in the face of all things java, we also have a bizarre ‘full’ attribute for web.xml’s root web-app element. Whatever happened to descriptive attributes? What’s so bad about instead specifying something like skip-annotation-scan=”true”? It’s certainly an impressive leap of faith for anyone to equate full is true to lazy class loading. This is merely one example of the EG’s general flatulence in the general direction of usability.

Next up we have some pointless syntactic sugar to allow multiple servlets mapped to a pattern, or multiple patterns mapped to a servlet/filter. Thank jeebus you wankers spent the last 12 months working on this, it’s certainly been worth the wait. Surely the community will applaud the wise investment of your time, and be grateful for this huge leap forward that seems to have taken you the better part of a year.

The error handling issue (you can call setStatus in an error page) was one I lobbied for, and I’m certainly amazed that this group of highly talented and insightful individuals actually added something useful to the spec. Given the rest of their work though, I’ll simply attribute it to a freak accident of nature.

It’s impressive to see that the group has gone out of its way to avoid adding anything useful. I’ve had three conversations with separate experts on the EG lobbying for the addition of ServletContext.getContextPath(). Every one of them was enthusiastic about it and thought it’d be a very useful method to add, needless to say, that has next to nothing to do with whether it’ll actually be added. At the time of writing, there is no mention of such an addition. (for any random Servlet EG members passing by, I dare you to give me a single good reason as to why such a method should not exist.)

Similarly, multipart support is still nowhere to be seen. Jason Hunter probably thinks that there are still idiots out there who use his solution, and so would be keen to avoid the spec stepping over his turf (and what better position to ensure that from than within the expert group itself).

The servlet group, much like the JSF group, has bizarre powers, for political reasons. In the case of servlets at least, they’ve been a victim of their own success, so there is a lot of inertia and resistance to change. The JSF group derives its power from Microsoft’s existence and success, and Sun’s baffling habit of attempting to mirror everything Microsoft does and ram it down a highly reluctant community’s throat via rounding up the most incompetent people it could find and hurling them at the problem. In both cases, the Men Upstairs at Sun should round up these so called experts, and let the beatings commence until they finally agree to play nice with the rest of the world.

19 Responses to “Servlet 2.5, the bad, the ugly, and the pointless”

  1. Rob Says:

    First?

  2. Vardaman Says:

    I have nothing useful to say. Maybe I can get in on EG fun?

  3. elmira.fudd Says:

    duh, it’s a good thing the servlet API has this though:

    “getServletContextName

    public String getServletContextName()

    Returns the name of this web application correponding to this ServletContext as specified in the deployment descriptor for this web application by the display-name element.

    Returns:
    The name of the web application or null if no name has been declared in the deployment descriptor.
    Since:
    Servlet 2.3

    the name of my web application as declared in the deployment descriptor (even if it doesn’t match the context path) is EXTREMELY USEFUL!

    You wascals, you….

  4. Jason Carreira Says:

    Aren’t you supposed to be fixing this shit now? Isn’t that what you were elected to do? When you were sworn in (I’m imagining a bizarre ceremony reminiscent of the ritual spankings portrayed in “Animal House”) weren’t you given a billyclub of righteousness? If not, maybe it’s time to change the mission of the EC…

  5. warelock Says:

    getServletContextName(). I didn’t know you could get the name of a web application … damn.

    DOUBLE damn.

    If I had known that, I could have saved my IT consulting job and my six-figure income instead of finding a new job for myself frying these patties of ‘meat by-product’ (shudder) in lard and salt.

    Sure, they’re tasty. But it’s not the same.

  6. Michael Jouravlev Says:

    I did not get what I wanted either: http://www.jroller.com/page/javadujour?entry=srv_2_5_no_candies
    But I don’t care much now.

  7. Craig Pfeifer Says:

    You should suggest the 2.5 servlet spec be renamed “Enterprise Servlet (ES) 5.0″. Take THAT PHP AND RAILS!

  8. Khurram Ijaz Says:

    I hope they dont add more mambo/jambo to the xml stuff already present in deployment descriptors…..

  9. jessieE Says:

    since your so good, why dont you write a book, get it published, do some talks and make a lot of noise so you can get yourself elected in to the EG and have your way with the spec

  10. Vic Says:

    “take their power from existance of MS”. That could explain a lot of Sun, it seems to be their standard answer. “well ms did it that way”.

    and why are you supprised by JCP? I’d allow a “disapointed but not supprised”.

    Like portlets are not a part of JEEv5. No new layouts are a part of JSEv6, they plan to delay the ready GroupLayout(netbeans) till JSE7.
    Don’t you have power to veto now, use it for us.
    .V

  11. Don Says:

    Just read Hunter’s JavaWorld article on Servlet 2.5 and I have to say I’m very dissapointed. To explain annotations he has to use an example of the @WebService annotation… in an article about servlets… which mandates using J2E5.0 for it’s annotation support… WTF?? Why are there no meaningful servlet annotations????????

    I especially appreciated the fact that he acknowledges there is _still no solution_ to the page after login (if one goes directly to the login page) and programatically logging in a user. As someone working in the real world its helpful to know these are real problems with no speced out solutions. Thanks from the bottom of my heart, people! NOT!

  12. Rich Says:

    I must say I’m confused about the lack of login solution. I thought the fashion was to hand over login handling to the servlet container (j_security_check, etc.) which will pass the user onto the requested page. Where is the problem here?

    I sort of see the point about the user registering and you not being able to inform the servlet environment programmatically but isn’t this ‘correct’ behaviour? After all, wouldn’t you want to verify registrations to avoid abuse?

    As much as I love your blog, Hani, Jason has a point. We can justifiably use the traditional open sores response to complaint: “Seeing as you know so much, join in and do something about it.” You are ideally placed to give Jason Hunter et al a playful kick in the hurty bits.

  13. eluzix Says:

    As already written here, what about multipart support????

  14. Dmitry Says:

    Agreed , that servlet annotations are poinless.
    But what is wrong in their new mapping scheme?

  15. Anonymous Bastard Says:

    What on earth would be the purpose of a @Filter annotation, when Filter is already an interface (and a proper, not marker, interface)?

  16. tom.ridge Says:

    You know what bothers me ? What bothers me is when I open Windows Explorer and it always opens up the ‘My Documents’ folder. Also, I never use that BS folder, but Windows tries to put things in there all the time.

    I don’t like it.

  17. Dan Sanchez Says:

    Hmm, bile isn’t strong enough or descriptive enough for these blog entries. I’m sure glad I don’t actually know anyone like you, but you’re proof that humunculi actually exist. Are you trying to be Howard Stern? I gather you’re about 17 years old?

  18. Howard Stern Says:

    Now, now, let’s all play NICE, my little friends ! Your Uncle Howard is all about happiness and defying The Man, as you know … but his name is a valuable piece of intellectual property and a registered trademark. We should not throw it around without proper .. .compensation, n’est ce pas ?

    Hani IS 17 years old. After serving two years as a Jordanian fighter pilot, he fond that his hair was beginning to fall out, and he switched to a gig where deliberately baldness was cool every five years or so. You see, Jordan doesn’t want bald fighter pilots, as they prefer ‘the young look’ for their ruthless military machine. (And who doesn’t ?)

    (I think that’s right – isn’t it ? Anyone please feel free to correct me on any of these details.)

    I think we should all be able to sympathize with Hani and understand the effect of this experience. Someday we, too, may be balding teenagers (or, for you ladies out there, someday we, too, may be rejected Jordanian fighter pilots). It’s a burden he’s carried with the same kind of dignity that I, Howard Stern, have always shown in my own struggle for freedom of expression. If he occasionally shows a preoccupation with flatulence … well, which of us has not ? Is an abiding interest in fecal matters and genitalia tuggging to be condemned out of hand, without understanding the man and his world ?

    I say ‘Never’ !

  19. bile slut Says:

    What the hell??!!??? its almost 1 month since this bile. When the fuck is the next one coming out? Hani, dont make me come over there and bitch slap you with my sagging boops…

Leave a Reply