Home Projects Jobs Clientele Contact


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HttpServlet vs. Servlet

I was looking at APIs for javax.servlet.Servlet* and javax.servlet.http.HttpServlet*, and I see that it is ServletRequest that implements things like "getCharacterEncoding", "getContentType", etc. This means that header parsing, and all other stuff have
to happen in there (unless servlet engine implements something completely
unrelated to HTTP, and can retrieve that information in some other manner).

This basically means that there is no _official_ way to change that functionality
within same engine.

This in turn means that there is no point in separating APIs between Servlet and HttpServlet*,
because HttpServlet would simply add few extra methods like "getDateHeader",
which can live in Servlet* classes.

I think I'll just clean up relationship between networking code and i/o streams a bit,
and consider this part done.

Ilya A. Volynets-Evenbakh
Total Knowledge. CTO

Authoright © Total Knowledge: 2001-2008