tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aditya Prasad" <akpra...@gmail.com>
Subject HttpRequestBase equivalent in 5.5?
Date Wed, 13 Sep 2006 01:16:19 GMT
I've been using HttpRequestBase (from Tomcat 4.0) as an impl of
HttpServletRequest to construct requests for test purposes outside of
Tomcat.  I've recently switched to 5.5, and am rewriting my tests,
since that class no longer exists.

I first tried using DummyRequest, but quickly found that the setters
don't seem to do anything, because the getters return nulls.  I then
tried org.apache.catalina.connector.Request, but I get NPEs when
calling getContentType (after calling setContentType) or
setServerName.

Am I not supposed to be using either of these classes?  Is there a
well-known impl that will allow me to set arbitrary data on a request
(I know this is a tall order -- there's probably a logical order in
which the object should be constructed anyway).

Thanks,
Aditya

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message