for short, this could be paraphrased like "inheritance versus function library"
for example, I'd like to add a method to the javax.servlet.http.HttpServletRequest that gives me the whole body, a getBody() method that would read the body thru the getReader method, just to put an example.
In other languages, like ruby or javascript, you could add a method to the base class, or even to a specific instance, but in java I see this two choices...
extend HttpServletRequest ( something like MyHttpServletRequest) and add the method
or create an HttpServeletHelper static class, with static methods, with the following method
public static String HttpServeletHelper.getBody( HttpServletRequest request )
the first approach is more object oriented, and elegant, but forces you to cast your object every time you need it, and somehow you have to tell jsp to use your class...
the second approach is just a good old function library... which might be a good or bad thing depending on how you look at it...
what pros / cons do you see in each approach, and which one is the more recommended for this kind of situations?
thanks in advance
saludos
sas