http request parameter

6 views
Skip to first unread message

jgabios

unread,
Oct 17, 2010, 12:37:41 PM10/17/10
to rife-users
i have a simple web application, where a user registers at a website,
then receives an email with a link to activate his registration.
the link looks like ..../activate?keycode=BZBZBZZB
now, when i want to test the element with MockConversation, i do like
this:
MockConversation conversation = new
MockConversation(Site.getRepInstance());
MockRequest req = new MockRequest();
req.setParameter("keycode", "BZBZBZBZBZ");
MockResponse response = conversation.doRequest("/
activate",req);
and in the process method of the element, i try to get the parameter
with getParameter("keycode");
it is null.
HttpServletRequest is null.
when i debug it, i see in ElementSupport the
mElementContext.getRequest() [ private method ] being a MockRequest
with 1 parameter: keycode.

what can i do to test my element that lives in a real world servlet
container?
Reply all
Reply to author
Forward
0 new messages