Why are there both Request and HttpServletRequest?
Tapestry’s Request interface is very close to the standard HttpServletRequest interface. It differs in a few ways, omitting some unneeded methods, and adding a couple of new methods (such as isXHR()), as well as changing how some existing methods operate. For example, getParameterNames() returns a sorted List of Strings; HttpServletRequest returns an Enumeration, which is a very dated approach. However, the stronger reason for Request (and the related interfaces Response and Session) is to enable the support for Portlets at some point in the future. By writing code in terms of Tapestry’s Request, and not HttpServletRequest, you can be assured that the same code will operate in both Servlet Tapestry and Portlet Tapestry.
Related Questions
- What can I do to assist students with disabilities who are eligible for notetaking services but reluctant to request and recruit a fellow classmate for copies of notes?
- The question really is: how do you get a reference to the current app module (from the HttpServletRequest !request!?) in the struts action class?
- When should an Institutional Review Board (IRB) or institution request a "407" review for research involving children as subjects?