When using Cactus it is common to use a beginXXX method
to set up
request parameters and other things, among them the
the request on the server side.
If you do so, request.getPathInfo() returns the correct
value inside the
testXXX, but you still have to invoke
as it seems) before you can invoke actionPerform.
The reason is that getActionServlet will
which has not been set unless you invoke
in an NPE.
One solution would be to invoke setRequestPathInfo in
CactusStrutsTestCase#setUp if the request provided by
already contains the path info.
I think this forum entry here
points at the same problem, I may be wrong.
As the docs say that you must invoke
setRequestPathInfo, I'm filing
this as an enhancement request and not a bug (even
though a null
check in CactusSTC line 415 may be a good idea anyway).
Log in to post a comment.