Folks--

I'm using maven and can't seem to test my struts actions with struts
test case.

Figured I'd bypass it and just use ServletTestCase instead but keep
getting a nullpointer exception.


public void beginTest(WebRequest request) {
   request.setURL("localhost:8080", "/public", "/home.do", null, null);
}

public void testTest() {
   WPAActionServlet servlet = new WPAActionServlet();
   try {
      servlet.config();
      servlet.service(request, response);
   }

   catch (Exception e) {
    "...."
   }
}

I get a NullPointerException every time.  (WPAActionServlet is an
extension of the ActionServlet).

Is testing Struts actions with ServletTestCase a bit less trivial than
the above suggests?  (The WPAActionServlet seems to work in that I can
tell from logs that it's loading all its plugins.)

Keith


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to