| Author |
How does a ServletRequest get created
|
Barry Gold
Greenhorn
Joined: Dec 15, 2005
Posts: 22
|
|
I started looking at the class definitions for ServletRequest and I'm mystified about where you get one from. The list of "All Known Implementing Classes" for ServletRequest is ServletRequestWrapper, and similarly the only implementing class for HttpServletRequest is HttpServletRequestWrapper. The two wrapper classes have only one constructor. That constructor requires a ServletRequest, which cannot be null. So I downloaded the Tomcat sources and started grepping for classes that implemented ServletRequest or HttpServletRequest. *Every* single class I could find that implements the ServletRequest interface (or a subinterface) uses the same paradigm and either is or "extends" one of the above wrapper classes. So you need to have a ServletRequest in order to create a ServletRequest. Where does the ServletRequest come from?
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Look in the connector packages.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: How does a ServletRequest get created
|
|
|