This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Firstly, the know and unknown classes in an association. For instance, look at the association between classes "ServletOutputStream" and interface "ServletResponse". It is uni-directional association. According to this article, a "uni-directional association is drawn as a solid line with an open arrowhead (not the closed arrowhead, or triangle, used to indicate inheritance) pointing to the known class". Therefore, the known type in our case is "ServletOutputStream". Lots of books (particularly, UML Distilled by Martin Fauler) say that association relationships are realized as fields in source code. And thats why, following the logic, class "ServletOutputStream" should contain the reference to a "ServletResponse" instance. But, on the contrary, "ServletResponse" has a getter for a "ServletOutputStream" (getOutputStream()).
Indeed, I too think this diagram is wrong. In the case of the ServletOutputStream -> ServletResponse relationship, I think I'd go with the dashed arrow from ServletResponse to ServletOutputStream, so it would be ServletResponse ------> ServletOutputStream. Although an interface cannot hold state, it would mean that the concrete classes that implement ServletResponse would depend on ServletOutputStream (well, in this case, the interface itself also depends on ServletOutputStream, because a method in it returns ServletOutputStream). And the relationship would be represented by the dashed arrow because this means dependency, which is used in cases where a class depends on another, for instance, when a method on class A returns class B, or class A receives class B as parameter on a method, etc.
There are other mistakes, like the relationships between ServletConfig, ServletContext and RequestDispatcher. It's the other way around, and I think I'd go with dashed arrows too.