jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Irwin <ke...@keithirwin.com>
Subject maven plugin help
Date Sat, 03 Jan 2004 02:03:15 GMT
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


Mime
View raw message