Leslie Liew - 2002-12-17

1) When i run TestLoginAction, it gave me this output...what was wrong?

.[INFO] ServletContextSimulator - -ActionServlet: init
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
java.lang.NullPointerException
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
    at org.apache.commons.digester.Digester.parse(Digester.java:1514)
    at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1257)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:451)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:206)
    at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:249)
    at examples.TestLoginAction.testSuccessfulLogin(TestLoginAction.java:28)
    at java.lang.reflect.Method.invoke(Native Method)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at junit.textui.TestRunner.doRun(TestRunner.java:116)
    at junit.textui.TestRunner.start(TestRunner.java:172)
    at junit.textui.TestRunner.main(TestRunner.java:138)
[ERROR] ActionServlet - -null <java.lang.NullPointerException>
java.lang.NullPointerException
    at org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:857)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:206)
    at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:249)
    at examples.TestLoginAction.testSuccessfulLogin(TestLoginAction.java:28)
    at java.lang.reflect.Method.invoke(Native Method)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at junit.textui.TestRunner.doRun(TestRunner.java:116)
    at junit.textui.TestRunner.start(TestRunner.java:172)
    at junit.textui.TestRunner.main(TestRunner.java:138)
[ERROR] ActionServlet - -Parsing error processing resource path /WEB-INF/struts-config.xml <java.lang.NullPointerException>
F
Time: 1.052
There was 1 failure:
1) testSuccessfulLogin(examples.TestLoginAction)junit.framework.AssertionFailedError: Parsing error processing resource path /WEB-INF/struts-config.xml
    at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:210)
    at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:249)
    at examples.TestLoginAction.testSuccessfulLogin(TestLoginAction.java:28)

FAILURES!!!
Tests run: 1,  Failures: 1,  Errors: 0

2) After downloading Strutstest19-1.0_2.2, i don't see any .jsp pages appear in this zip file as what it specified in the strut-config.xml. Example i don't see login.jsp as specified in the strut-config.xml.

<action path="/login" type="examples.LoginAction" name="loginForm" input="/login/login.jsp" scope="request">
<forward name="success" path="/main/success.jsp"/>
</action>

Also I don't see any additional folder by the name of "login" or "main" that contain login.jsp and success.jsp respectively.