jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Childers" <jchild...@hotels.com>
Subject RE: Clearing request parameters in test method
Date Wed, 11 Dec 2002 15:05:50 GMT

> From: Robertson, Jason [mailto:Jason.Robertson@acs-inc.com]
> Subject: RE: Clearing request parameters in test method
> 
> Hmmm. Did you try this:
> 
> 	request.getParameterMap().remove("lang");
> 
> I don't know if the Map returned is live or not, so this may 
> or may not
> work. 

Alas, no. Trying this gives:
java.lang.NoSuchMethodError 
at org.apache.cactus.server.HttpServletRequestWrapper.getParameterMap (HttpServletRequestWrapper.java;org/apache/cactus/util/log/LogAspect.aj(1k):134)

> But, if what you're trying to do (and I'm making big 
> assumptions here) is
> test that the htmlTag tag sees the "es" in the session and 
> thus returns "es"
> instead of returning "en" (presumably) because the request is 
> empty, you
> could just set up the session to have the appropriate lang 
> attribute for the
> scenario you're testing. 

This is true, but I was wanting to test it all together; i.e. call the doStartTag() method
twice and test the results. If it can't be done, then so be it. 
 
Thanks for your help, by the way.

-= J

--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message