Cactus - Tomcat Quickstart forewords
第一次使用Cactus,按照官方教學操作,搞了老半天開始執行時卻出現錯誤:
javax.servlet.ServletException: Failed to load test suite [InvoiceSvTDDTest], Reason is [Class not found "InvoiceSvTDDTest"] org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.java:303) org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(ServletTestRunner.java:187) org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advice(ServletTestRunner.java:218) org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.java:1) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) com.ctbc.mi.web.filter.ClearTempFilter.doFilter(ClearTempFilter.java:43)
2013/3/7更新:是可以使用package的,只要如下使用: http://localhost:8080/test/ServletTestRunner?suite=packagename.TestSampleServlet 就可以囉,
例如: http://localhost:8080/test/ServletTestRunner?suite=ut.test.pkg.TestSampleServlet 其中ut.test.pkg就是packag的全名了
沒有留言:
張貼留言