Hi Harun,
there's not really a way since the point of the testing API is that
it runs outside of any servlet container. Your only option would be
to embed a servlet container, like Jetty, and do that part of the
testing through there. RIFE does this itself for quite a number of
its tests, you can look at the sources to see how it's done.
Hope this helps,
Geert
On 12 Sep 2006, at 14:58, Harun Hasdal wrote:
Hi,
I am using rife-1.3.1 for jdk1.4 and I came in need of accessing
HttpServletRequest from my element.
I'm using getHttpServletRequest().getParameterMap() to access the
parameters that are not specified as inputs or parameters in the
element declaration.
The issue when testing the code with MockConversation and
MockRequest, getHttpServletRequest() returns null.
Is there any way to Mock the HttpServletRequest and be able to set
its parameters?
Or is there any other way to access the request parameters that are
not declared in the element? Below is a sample element and request
that better describes what i m trying to do.
<element implementation="elements.ExecuteScript">
<input name="Identifier"/>
<input name="Script"/>
</element>
Request URL : /executeScript?
Identifier=identifier&Script=script1.groovy&Extra=234&AnotherExtra=123
Is this the right way to use getHttpServletRequest().getParameterMap
() to get the Extra parameters?
Thanks
Harun.
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users